Fixes issue 1945. Toast debug location when enabling debug logging.

This commit is contained in:
Fiouz 2010-09-01 21:27:11 +00:00
parent 9b285ae3fc
commit f21d86d8ce
2 changed files with 8 additions and 0 deletions

View file

@ -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_cancel_button">Do not delete</string>
<string name="debug_logging_enabled">Debug logging to Android logging system enabled</string>
</resources>

View file

@ -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());