diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-05 12:39:29 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-05 12:49:25 -0700 |
commit | 69621ece97d9f82e7408562f28110f40d872cb24 (patch) | |
tree | 14cd4846b38f6cf1ad5bbf826ca3cd27d5cf99ff /src | |
parent | 9d90489078b406d3a52e27ef517278e15f603f76 (diff) | |
download | packages_apps_settings-69621ece97d9f82e7408562f28110f40d872cb24.zip packages_apps_settings-69621ece97d9f82e7408562f28110f40d872cb24.tar.gz packages_apps_settings-69621ece97d9f82e7408562f28110f40d872cb24.tar.bz2 |
Locale selection settings do not hide warning dialog.
1. If there is more than one user on the device and a user tries
to modify the locale which is shared across all users we are
showing a warning dialog. When the user selects OK we are
changing the locale and going to the previous screen. This is
achieved by removing the locale selection fragment from the
backstack. The problem was that the dialog was not dismissed
upon OK in the dialog which resulted in saving the dialog's
state and an attempt to restore it on the wrong fragment which
has no idea about this dialog, this returning a null dialog
resulting in a crash. This change removes the dialog on
OK selection.
bug:7265186
Change-Id: I336ab54f5281c7a9ae24f1c25769daac46477ebd
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/LocalePicker.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/settings/LocalePicker.java b/src/com/android/settings/LocalePicker.java index 1272ddc..5827ef7 100644 --- a/src/com/android/settings/LocalePicker.java +++ b/src/com/android/settings/LocalePicker.java @@ -17,9 +17,7 @@ package com.android.settings; import android.app.Dialog; -import android.content.Context; import android.os.Bundle; -import android.os.UserManager; import android.util.Log; import com.android.settings.SettingsPreferenceFragment.SettingsDialogFragment; @@ -83,6 +81,7 @@ public class LocalePicker extends com.android.internal.app.LocalePicker R.string.global_locale_change_title, new Runnable() { public void run() { + removeDialog(dialogId); getActivity().onBackPressed(); LocalePicker.updateLocale(mTargetLocale); } |