diff options
author | Amith Yamasani <yamasani@google.com> | 2012-06-07 19:58:34 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-06-07 19:58:34 -0700 |
commit | 665235f6ef5cf5739485a4076be332b0b2cb4431 (patch) | |
tree | 4790e053ff19fbff6c41ca64c35cacb2678e463e /src | |
parent | ffa6f6e3e260dad0e7f75f6e8daa892eeed8df92 (diff) | |
download | packages_apps_settings-665235f6ef5cf5739485a4076be332b0b2cb4431.zip packages_apps_settings-665235f6ef5cf5739485a4076be332b0b2cb4431.tar.gz packages_apps_settings-665235f6ef5cf5739485a4076be332b0b2cb4431.tar.bz2 |
Save the auto-sync dialog state for orientation changes
Bug: 6630421
Change-Id: I11447173483da499e23c5ce41c566fa988385e6b
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 656d4c4..13512d4 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -2035,6 +2035,7 @@ public class DataUsageSummary extends Fragment { * Dialog to inform user about changing auto-sync setting */ public static class ConfirmAutoSyncChangeFragment extends DialogFragment { + private static final String SAVE_ENABLING = "enabling"; private boolean mEnabling; public static void show(DataUsageSummary parent, boolean enabling) { @@ -2049,6 +2050,9 @@ public class DataUsageSummary extends Fragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Context context = getActivity(); + if (savedInstanceState != null) { + mEnabling = savedInstanceState.getBoolean(SAVE_ENABLING); + } final AlertDialog.Builder builder = new AlertDialog.Builder(context); if (!mEnabling) { @@ -2069,6 +2073,12 @@ public class DataUsageSummary extends Fragment { return builder.create(); } + + @Override + public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putBoolean(SAVE_ENABLING, mEnabling); + } } /** |