Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55cbba60 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use "Disable"/"Enable" for system app"

parents ff02854e 0d79b616
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -4194,6 +4194,8 @@
    <string name="uninstall_all_users_text">Uninstall for all users</string>
    <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. -->
    <!-- [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>
    <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. -->
    <!-- [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>
    <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) -->
    <!-- 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) -->
@@ -4332,9 +4334,9 @@
    <!-- Manage applications. application installation location summary -->
    <!-- Manage applications. application installation location summary -->
    <string name="app_install_location_summary">Change the preferred installation location for new apps</string>
    <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 -->
    <!-- [CHAR LIMIT=30] Manage applications, label for option to disable app -->
    <string name="app_disable_dlg_positive">Uninstall app</string>
    <string name="app_disable_dlg_positive">Disable app</string>
    <!-- [CHAR LIMIT=200] Manage applications, text for dialog when disabling apps -->
    <!-- [CHAR LIMIT=NONE] 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_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 -->
    <!-- [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>
    <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] -->
    <!-- Manage applications, individual application info screen, section heading for information about the app installer [CHAR_LIMIT=25] -->
+3 −3
Original line number Original line Diff line number Diff line
@@ -559,15 +559,15 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
        if (mHomePackages.contains(mAppEntry.info.packageName)
        if (mHomePackages.contains(mAppEntry.info.packageName)
                || isSystemPackage(mActivity.getResources(), mPm, mPackageInfo)) {
                || isSystemPackage(mActivity.getResources(), mPm, mPackageInfo)) {
            // Disable button for core system applications.
            // Disable button for core system applications.
            mButtonsPref.setButton2Text(R.string.uninstall_text)
            mButtonsPref.setButton2Text(R.string.disable_text)
                    .setButton2Icon(R.drawable.ic_settings_delete);
                    .setButton2Icon(R.drawable.ic_settings_delete);
        } else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) {
        } else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) {
            mButtonsPref.setButton2Text(R.string.uninstall_text)
            mButtonsPref.setButton2Text(R.string.disable_text)
                    .setButton2Icon(R.drawable.ic_settings_delete);
                    .setButton2Icon(R.drawable.ic_settings_delete);
            disableable = !mApplicationFeatureProvider.getKeepEnabledPackages()
            disableable = !mApplicationFeatureProvider.getKeepEnabledPackages()
                    .contains(mAppEntry.info.packageName);
                    .contains(mAppEntry.info.packageName);
        } else {
        } else {
            mButtonsPref.setButton2Text(R.string.install_text)
            mButtonsPref.setButton2Text(R.string.enable_text)
                    .setButton2Icon(R.drawable.ic_settings_install);
                    .setButton2Icon(R.drawable.ic_settings_install);
            disableable = true;
            disableable = true;
        }
        }