Use "Disable"/"Enable" for system app

- Also modify warning message for disable dialog.

Bug: 124116610
Bug: 128769312

Test: visual
Change-Id: I2f68f51538d3dd17898aa668dae52d1d8e955ec7
This commit is contained in:
tmfang
2019-02-27 15:05:01 +08:00
parent f669a3bd70
commit 0d79b61634
2 changed files with 8 additions and 6 deletions

View File

@@ -4183,6 +4183,8 @@
<string name="uninstall_all_users_text">Uninstall for all users</string>
<!-- [CHAR LIMIT=NONE] Manage applications, individual application info screen, button label under Storage heading. Button to install an application for the user. -->
<string name="install_text">Install</string>
<!-- [CHAR LIMIT=25] Manage applications, individual application info screen, button label under Storage heading. Button to disable an existing application. -->
<string name="disable_text">Disable</string>
<!-- [CHAR LIMIT=25] Manage applications, individual application info screen, button label under Storage heading. Button to re-enable an existing application. -->
<string name="enable_text">Enable</string>
<!-- Manage applications, individual application info screen, button label under Storage heading. Button to clear all data associated with tis app (for example, remove all cached emails for an Email app) -->
@@ -4321,9 +4323,9 @@
<!-- Manage applications. application installation location summary -->
<string name="app_install_location_summary">Change the preferred installation location for new apps</string>
<!-- [CHAR LIMIT=30] Manage applications, label for option to disable app -->
<string name="app_disable_dlg_positive">Uninstall app</string>
<!-- [CHAR LIMIT=200] Manage applications, text for dialog when disabling apps -->
<string name="app_disable_dlg_text">If you uninstall this app, Android and other apps may no longer function as intended.</string>
<string name="app_disable_dlg_positive">Disable app</string>
<!-- [CHAR LIMIT=NONE] Manage applications, text for dialog when disabling apps -->
<string name="app_disable_dlg_text">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.</string>
<!-- [CHAR LIMIT=30] Manage applications, title for dialog when disabling notifications for an app -->
<string name="app_disable_notifications_dlg_title">Turn off notifications?</string>
<!-- Manage applications, individual application info screen, section heading for information about the app installer [CHAR_LIMIT=25] -->

View File

@@ -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;
}