diff options
author | Amith Yamasani <yamasani@google.com> | 2009-07-13 15:09:46 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2009-07-13 15:09:46 -0700 |
commit | 5c30845cf310a5d8c2de3e9ac809c97f736a9513 (patch) | |
tree | b8d1945b65ceab430cfa8334bc6e6a0d255158e8 /src/com | |
parent | fe0b0178cb2d24b8e6e1477055617bbf86a0808b (diff) | |
download | packages_apps_settings-5c30845cf310a5d8c2de3e9ac809c97f736a9513.zip packages_apps_settings-5c30845cf310a5d8c2de3e9ac809c97f736a9513.tar.gz packages_apps_settings-5c30845cf310a5d8c2de3e9ac809c97f736a9513.tar.bz2 |
Fix #1930767 : "Share with Google" not working on orientation change.
Discard the dialog after onSaveInstanceState. And check the different
onCreate scenarios before popping up the dialog.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index b34e8b1..d3c0783 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -150,9 +150,10 @@ public class SecuritySettings extends PreferenceActivity implements null); mContentQueryMap = new ContentQueryMap(settingsCursor, Settings.System.NAME, true, null); mContentQueryMap.addObserver(new SettingsObserver()); - boolean doneUseLocation = savedInstanceState != null - && savedInstanceState.getBoolean(KEY_DONE_USE_LOCATION, true); - if (getIntent().getBooleanExtra("SHOW_USE_LOCATION", false) && !doneUseLocation) { + boolean doneUseLocation = savedInstanceState == null + ? false : savedInstanceState.getBoolean(KEY_DONE_USE_LOCATION, true); + if (!doneUseLocation && (getIntent().getBooleanExtra("SHOW_USE_LOCATION", false) + || savedInstanceState != null)) { showUseLocationDialog(true); } @@ -261,12 +262,12 @@ public class SecuritySettings extends PreferenceActivity implements } @Override - public void onPause() { + public void onStop() { if (mUseLocationDialog != null && mUseLocationDialog.isShowing()) { mUseLocationDialog.dismiss(); } mUseLocationDialog = null; - super.onPause(); + super.onStop(); } @Override |