From f21d86d8ce1470fec20fddb025716b2d4adaebae Mon Sep 17 00:00:00 2001 From: Fiouz Date: Wed, 1 Sep 2010 21:27:11 +0000 Subject: [PATCH] Fixes issue 1945. Toast debug location when enabling debug logging. --- res/values/strings.xml | 2 ++ src/com/fsck/k9/activity/setup/Prefs.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index e0b805fd6..cb5786195 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -946,4 +946,6 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin Delete Do not delete + Debug logging to Android logging system enabled + diff --git a/src/com/fsck/k9/activity/setup/Prefs.java b/src/com/fsck/k9/activity/setup/Prefs.java index ff3570ab1..69b54276d 100644 --- a/src/com/fsck/k9/activity/setup/Prefs.java +++ b/src/com/fsck/k9/activity/setup/Prefs.java @@ -13,6 +13,7 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.view.KeyEvent; +import android.widget.Toast; import com.fsck.k9.K9; import com.fsck.k9.Preferences; @@ -255,6 +256,11 @@ public class Prefs extends K9PreferenceActivity SharedPreferences preferences = Preferences.getPreferences(this).getPreferences(); K9.setK9Language(mLanguage.getValue()); 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_SENSITIVE = mSensitiveLogging.isChecked(); boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());