From 0d79b616347e1b55f6583928c848ff34c395f8b5 Mon Sep 17 00:00:00 2001 From: tmfang Date: Wed, 27 Feb 2019 15:05:01 +0800 Subject: [PATCH] Use "Disable"/"Enable" for system app - Also modify warning message for disable dialog. Bug: 124116610 Bug: 128769312 Test: visual Change-Id: I2f68f51538d3dd17898aa668dae52d1d8e955ec7 --- res/values/strings.xml | 8 +++++--- .../appinfo/AppButtonsPreferenceController.java | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index e4d0d115f0d..87e489cbe1f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4183,6 +4183,8 @@ Uninstall for all users Install + + Disable Enable @@ -4321,9 +4323,9 @@ Change the preferred installation location for new apps - Uninstall app - - If you uninstall this app, Android and other apps may no longer function as intended. + Disable app + + If you disable this app, Android and other apps may no longer function as intended. Keep in mind, you can\u2019t delete this app since it came pre-installed on your device. By disabling, you turn this app off and hide it on your device. Turn off notifications? diff --git a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java index c6618908f52..e118ed609d2 100644 --- a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java +++ b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java @@ -559,15 +559,15 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp if (mHomePackages.contains(mAppEntry.info.packageName) || isSystemPackage(mActivity.getResources(), mPm, mPackageInfo)) { // Disable button for core system applications. - mButtonsPref.setButton2Text(R.string.uninstall_text) + mButtonsPref.setButton2Text(R.string.disable_text) .setButton2Icon(R.drawable.ic_settings_delete); } else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) { - mButtonsPref.setButton2Text(R.string.uninstall_text) + mButtonsPref.setButton2Text(R.string.disable_text) .setButton2Icon(R.drawable.ic_settings_delete); disableable = !mApplicationFeatureProvider.getKeepEnabledPackages() .contains(mAppEntry.info.packageName); } else { - mButtonsPref.setButton2Text(R.string.install_text) + mButtonsPref.setButton2Text(R.string.enable_text) .setButton2Icon(R.drawable.ic_settings_install); disableable = true; }