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

Commit eb151ee8 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Always show lockdown button

Remove setting option and show lockdown button by default in the power menu

Fixes: 185618694
Test: atest GlobalActionsDialogLiteTest
Test: flash device, set PIN, observe button present

Change-Id: I7c8f976fd73f6edf3edb26c8de31fd83eb9ac296
parent b10b4141
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -9659,13 +9659,6 @@ public final class Settings {
        @Readable
        public static final String QS_AUTO_ADDED_TILES = "qs_auto_tiles";
        /**
         * Whether the Lockdown button should be shown in the power menu.
         * @hide
         */
        @Readable
        public static final String LOCKDOWN_IN_POWER_MENU = "lockdown_in_power_menu";
        /**
         * Backup manager behavioral parameters.
         * This is encoded as a key=value list, separated by commas. Ex:
+0 −1
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ public class SecureSettings {
        Settings.Secure.SCREENSAVER_COMPONENTS,
        Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK,
        Settings.Secure.SCREENSAVER_ACTIVATE_ON_SLEEP,
        Settings.Secure.LOCKDOWN_IN_POWER_MENU,
        Settings.Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION,
        Settings.Secure.VOLUME_HUSH_GESTURE,
        Settings.Secure.MANUAL_RINGER_TOGGLE_COUNT,
+0 −1
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.SCREENSAVER_COMPONENTS, COMMA_SEPARATED_COMPONENT_LIST_VALIDATOR);
        VALIDATORS.put(Secure.SCREENSAVER_ACTIVATE_ON_DOCK, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SCREENSAVER_ACTIVATE_ON_SLEEP, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.LOCKDOWN_IN_POWER_MENU, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.VOLUME_HUSH_GESTURE, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(
+0 −3
Original line number Diff line number Diff line
@@ -2223,9 +2223,6 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.LOCK_TO_APP_EXIT_LOCKED,
                SecureSettingsProto.LOCK_TO_APP_EXIT_LOCKED);
        dumpSetting(s, p,
                Settings.Secure.LOCKDOWN_IN_POWER_MENU,
                SecureSettingsProto.LOCKDOWN_IN_POWER_MENU);
        dumpSetting(s, p,
                Settings.Secure.LONG_PRESS_TIMEOUT,
                SecureSettingsProto.LONG_PRESS_TIMEOUT);
+0 −5
Original line number Diff line number Diff line
@@ -669,11 +669,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene

        int userId = user.id;

        // No lockdown option if it's not turned on in Settings
        if (mSecureSettings.getIntForUser(Settings.Secure.LOCKDOWN_IN_POWER_MENU, 0, userId) == 0) {
            return false;
        }

        // Lockdown is meaningless without a place to go.
        if (!mKeyguardStateController.isMethodSecure()) {
            return false;