diff options
Diffstat (limited to 'src/com')
-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) { |