|
|
@ -186,6 +186,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
prefs.edit().putBoolean("debug", checked).apply();
|
|
|
|
prefs.edit().putBoolean("debug", checked).apply();
|
|
|
|
|
|
|
|
tvMemoryClass.setVisibility(checked ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
tvLastCleanup.setVisibility(checked ? View.VISIBLE : View.GONE);
|
|
|
|
ServiceSynchronize.reload(getContext(), "debug=" + checked);
|
|
|
|
ServiceSynchronize.reload(getContext(), "debug=" + checked);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -256,6 +258,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
ActivityManager am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);
|
|
|
|
ActivityManager am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);
|
|
|
|
int class_mb = am.getMemoryClass();
|
|
|
|
int class_mb = am.getMemoryClass();
|
|
|
|
tvMemoryClass.setText(getString(R.string.title_advanced_memory_class, class_mb + " MB"));
|
|
|
|
tvMemoryClass.setText(getString(R.string.title_advanced_memory_class, class_mb + " MB"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tvMemoryClass.setVisibility(swDebug.isChecked() ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
tvLastCleanup.setVisibility(swDebug.isChecked() ? View.VISIBLE : View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void setLastCleanup(long time) {
|
|
|
|
private void setLastCleanup(long time) {
|
|
|
|