add log max size feature
This commit is contained in:
parent
b9f14b318b
commit
0dc50cc492
|
@ -178,6 +178,10 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
|||
private void appendLogTextAndScroll(String text)
|
||||
{
|
||||
if(mTxtOrbotLog != null){
|
||||
|
||||
if (mTxtOrbotLog.getText().length() > MAX_LOG_LENGTH)
|
||||
mTxtOrbotLog.setText("");
|
||||
|
||||
mTxtOrbotLog.append(text + "\n");
|
||||
final Layout layout = mTxtOrbotLog.getLayout();
|
||||
if(layout != null){
|
||||
|
|
|
@ -53,4 +53,7 @@ public interface TorConstants {
|
|||
public final static String PREF_DISABLE_NETWORK = "pref_disable_network";
|
||||
|
||||
public final static String PREF_TOR_SHARED_PREFS = "org.torproject.android_preferences";
|
||||
|
||||
public final static int MAX_LOG_LENGTH = 10000;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue