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
This commit is contained in:
Amith Yamasani
2016-03-30 09:52:33 -07:00
parent 9c867a5703
commit bacc708f96
2 changed files with 1 additions and 19 deletions

View File

@@ -3350,10 +3350,6 @@
<string name="app_not_found_dlg_text"> The app wasn\u2019t found in the list of installed apps.</string> <string name="app_not_found_dlg_text"> The app wasn\u2019t found in the list of installed apps.</string>
<!-- Manage applications, individual application dialog box message. Shown when there was an error trying to clear the data. --> <!-- Manage applications, individual application dialog box message. Shown when there was an error trying to clear the data. -->
<string name="clear_data_failed">Couldn\u2019t clear app data.</string> <string name="clear_data_failed">Couldn\u2019t clear app data.</string>
<!-- Manage applications, factory reset dialog title for system applications. -->
<string name="app_factory_reset_dlg_title">Uninstall updates?</string>
<!-- Manage applications, factory reset option dialog text for system applications. -->
<string name="app_factory_reset_dlg_text">All updates to this Android system app will be uninstalled.</string>
<!-- Manage applications, title for dialog if clear data fails--> <!-- Manage applications, title for dialog if clear data fails-->
<string name="clear_failed_dlg_title">Clear data</string> <string name="clear_failed_dlg_title">Clear data</string>
<!-- Manage applications, text for dialog if clear data fails--> <!-- Manage applications, text for dialog if clear data fails-->

View File

@@ -134,7 +134,6 @@ public class InstalledAppDetails extends AppInfoBase
private static final int DLG_FORCE_STOP = DLG_BASE + 1; private static final int DLG_FORCE_STOP = DLG_BASE + 1;
private static final int DLG_DISABLE = DLG_BASE + 2; private static final int DLG_DISABLE = DLG_BASE + 2;
private static final int DLG_SPECIAL_DISABLE = DLG_BASE + 3; 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_HEADER = "header_view";
private static final String KEY_NOTIFICATION = "notification_settings"; private static final String KEY_NOTIFICATION = "notification_settings";
@@ -473,7 +472,7 @@ public class InstalledAppDetails extends AppInfoBase
uninstallPkg(mAppEntry.info.packageName, true, false); uninstallPkg(mAppEntry.info.packageName, true, false);
return true; return true;
case UNINSTALL_UPDATES: case UNINSTALL_UPDATES:
showDialogInner(DLG_FACTORY_RESET, 0); uninstallPkg(mAppEntry.info.packageName, false, false);
return true; return true;
} }
return false; return false;
@@ -671,19 +670,6 @@ public class InstalledAppDetails extends AppInfoBase
}) })
.setNegativeButton(R.string.dlg_cancel, null) .setNegativeButton(R.string.dlg_cancel, null)
.create(); .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; return null;
} }