diff options
author | Danesh M <daneshm90@gmail.com> | 2015-09-22 21:55:16 -0700 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-27 23:24:20 +0200 |
commit | 1fb74bb2505865c7ffe3357f3534cf6494b2c0bd (patch) | |
tree | 6694fdd8946611b36f2332a37eb5d34d68c95ef4 /src/com/android/settings/profiles | |
parent | 91f19f2a1c54a46f4c9edcec26c9d08662de6f96 (diff) | |
download | packages_apps_Settings-1fb74bb2505865c7ffe3357f3534cf6494b2c0bd.zip packages_apps_Settings-1fb74bb2505865c7ffe3357f3534cf6494b2c0bd.tar.gz packages_apps_Settings-1fb74bb2505865c7ffe3357f3534cf6494b2c0bd.tar.bz2 |
Settings : Save instance state for app group deletes
When deleting an app, inside of an app group in profiles,
if the user rotates device while confirmation is showing and
presses ok, it is a no-op. Reason is mPackageToDelete loses its
state when rotation is change.
Address this by persisting it in the state bundle.
issue-id: CYNGNOS-1119
Change-Id: I43dd9ccae7e16e92e5ac054f1b2ac0119cbfe60b
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/AppGroupConfig.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/settings/profiles/AppGroupConfig.java b/src/com/android/settings/profiles/AppGroupConfig.java index b05f485..5e25bce 100644 --- a/src/com/android/settings/profiles/AppGroupConfig.java +++ b/src/com/android/settings/profiles/AppGroupConfig.java @@ -82,6 +82,10 @@ public class AppGroupConfig extends SettingsPreferenceFragment public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + if (savedInstanceState != null) { + mPackageToDelete = savedInstanceState.getString("package_delete"); + } + mProfileManager = ProfileManager.getInstance(getActivity()); addPreferencesFromResource(R.xml.application_list); @@ -319,4 +323,10 @@ public class AppGroupConfig extends SettingsPreferenceFragment mNotificationGroup.removePackage(mPackageToDelete); updatePackages(); } -} + + @Override + public void onSaveInstanceState(Bundle in) { + super.onSaveInstanceState(in); + in.putString("package_delete", mPackageToDelete); + } +}
\ No newline at end of file |