mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Fixes issue 1945. Toast debug location when enabling debug logging.
This commit is contained in:
parent
9b285ae3fc
commit
f21d86d8ce
@ -946,4 +946,6 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
|||||||
<string name="dialog_confirm_delete_confirm_button">Delete</string>
|
<string name="dialog_confirm_delete_confirm_button">Delete</string>
|
||||||
<string name="dialog_confirm_delete_cancel_button">Do not delete</string>
|
<string name="dialog_confirm_delete_cancel_button">Do not delete</string>
|
||||||
|
|
||||||
|
<string name="debug_logging_enabled">Debug logging to Android logging system enabled</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -13,6 +13,7 @@ import android.preference.CheckBoxPreference;
|
|||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.fsck.k9.K9;
|
import com.fsck.k9.K9;
|
||||||
import com.fsck.k9.Preferences;
|
import com.fsck.k9.Preferences;
|
||||||
@ -255,6 +256,11 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
SharedPreferences preferences = Preferences.getPreferences(this).getPreferences();
|
SharedPreferences preferences = Preferences.getPreferences(this).getPreferences();
|
||||||
K9.setK9Language(mLanguage.getValue());
|
K9.setK9Language(mLanguage.getValue());
|
||||||
K9.setK9Theme(mTheme.getValue().equals("dark") ? android.R.style.Theme : android.R.style.Theme_Light);
|
K9.setK9Theme(mTheme.getValue().equals("dark") ? android.R.style.Theme : android.R.style.Theme_Light);
|
||||||
|
|
||||||
|
if (!K9.DEBUG && mDebugLogging.isChecked())
|
||||||
|
{
|
||||||
|
Toast.makeText(this, R.string.debug_logging_enabled, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
K9.DEBUG = mDebugLogging.isChecked();
|
K9.DEBUG = mDebugLogging.isChecked();
|
||||||
K9.DEBUG_SENSITIVE = mSensitiveLogging.isChecked();
|
K9.DEBUG_SENSITIVE = mSensitiveLogging.isChecked();
|
||||||
boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());
|
boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());
|
||||||
|
Loading…
Reference in New Issue
Block a user