diff options
author | Danny Baumann <dannybaumann@web.de> | 2013-06-29 04:04:58 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-06-29 04:04:58 -0700 |
commit | cf77877641de4d113bcd1a044dd687a874e3956b (patch) | |
tree | 7e6d744190e6dd9fa0888b390d8fff4310e8eccf | |
parent | 8c766635209f89ab81faedf9811c842aed23ed4e (diff) | |
parent | c5f12102ef775c7e94f76cd4f1d40e13e5ad753c (diff) | |
download | packages_apps_settings-cf77877641de4d113bcd1a044dd687a874e3956b.zip packages_apps_settings-cf77877641de4d113bcd1a044dd687a874e3956b.tar.gz packages_apps_settings-cf77877641de4d113bcd1a044dd687a874e3956b.tar.bz2 |
Merge "Handle cancellation of the 'enabling PrivacyGuard' alert box." into cm-10.1
-rw-r--r-- | src/com/android/settings/applications/InstalledAppDetails.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 416c92f..16f7efd 100644 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -1181,8 +1181,7 @@ public class InstalledAppDetails extends Fragment .setNegativeButton(R.string.dlg_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - // Re-enable the checkbox - getOwner().mNotificationSwitch.setChecked(true); + dialog.cancel(); } }) .create(); @@ -1215,14 +1214,27 @@ public class InstalledAppDetails extends Fragment .setNegativeButton(R.string.dlg_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - // Re-enable the checkbox - getOwner().mPrivacyGuardSwitch.setChecked(false); + dialog.cancel(); } }) .create(); } throw new IllegalArgumentException("unknown id " + id); } + + @Override + public void onCancel(DialogInterface dialog) { + int id = getArguments().getInt("id"); + switch (id) { + case DLG_DISABLE_NOTIFICATIONS: + // Re-enable the checkbox + getOwner().mNotificationSwitch.setChecked(true); + case DLG_PRIVACY_GUARD: + // Re-enable the checkbox + getOwner().mPrivacyGuardSwitch.setChecked(false); + break; + } + } } private void uninstallPkg(String packageName, boolean allUsers, boolean andDisable) { |