From bacc708f96f8ff375261cbb3541b6b949b79e91a Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Wed, 30 Mar 2016 09:52:33 -0700 Subject: [PATCH] Don't prompt twice to uninstall updates PackageInstaller is going to ask again, so skip asking in Settings when user wants to uninstall updates to a system app. Bug: 26694521 Change-Id: I4335a4e9bfe54985eb58ba19a890caba06705bef --- res/values/strings.xml | 4 ---- .../applications/InstalledAppDetails.java | 16 +--------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 5075bca7831..5529adf03ba 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3350,10 +3350,6 @@ The app wasn\u2019t found in the list of installed apps. Couldn\u2019t clear app data. - - Uninstall updates? - - All updates to this Android system app will be uninstalled. Clear data diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 61ab2c31967..f91f7bf0e88 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -134,7 +134,6 @@ public class InstalledAppDetails extends AppInfoBase private static final int DLG_FORCE_STOP = DLG_BASE + 1; private static final int DLG_DISABLE = DLG_BASE + 2; private static final int DLG_SPECIAL_DISABLE = DLG_BASE + 3; - private static final int DLG_FACTORY_RESET = DLG_BASE + 4; private static final String KEY_HEADER = "header_view"; private static final String KEY_NOTIFICATION = "notification_settings"; @@ -473,7 +472,7 @@ public class InstalledAppDetails extends AppInfoBase uninstallPkg(mAppEntry.info.packageName, true, false); return true; case UNINSTALL_UPDATES: - showDialogInner(DLG_FACTORY_RESET, 0); + uninstallPkg(mAppEntry.info.packageName, false, false); return true; } return false; @@ -671,19 +670,6 @@ public class InstalledAppDetails extends AppInfoBase }) .setNegativeButton(R.string.dlg_cancel, null) .create(); - case DLG_FACTORY_RESET: - return new AlertDialog.Builder(getActivity()) - .setTitle(getActivity().getText(R.string.app_factory_reset_dlg_title)) - .setMessage(getActivity().getText(R.string.app_factory_reset_dlg_text)) - .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - // Clear user data here - uninstallPkg(mAppEntry.info.packageName, - false, false); - } - }) - .setNegativeButton(R.string.dlg_cancel, null) - .create(); } return null; }