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

Commit 854036d5 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Add option to disable lockscreen by default"

parents f833f622 2eff7450
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -589,8 +589,14 @@ public class LockPatternUtils {
     * @return true if lock screen is disabled
     */
    public boolean isLockScreenDisabled(int userId) {
        return !isSecure(userId) &&
                getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId);
        if (isSecure(userId)) {
            return false;
        }
        boolean disabledByDefault = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_disableLockscreenByDefault);
        boolean isSystemUser = UserManager.isSplitSystemUser() && userId == UserHandle.USER_SYSTEM;
        return getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId)
                || (disabledByDefault && !isSystemUser);
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -970,6 +970,9 @@
         If so, this should be set to 'false' in an overlay. -->
    <bool name="config_enable_emergency_call_while_sim_locked">true</bool>

    <!-- Is the lock-screen disabled for new users by default -->
    <bool name="config_disableLockscreenByDefault">false</bool>

    <!-- Control the behavior when the user long presses the home button.
            0 - Nothing
            1 - Recent apps view in SystemUI
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@
  <java-symbol type="bool" name="config_autoPowerModePrefetchLocation" />
  <java-symbol type="bool" name="config_enable_emergency_call_while_sim_locked" />
  <java-symbol type="bool" name="config_enable_puk_unlock_screen" />
  <java-symbol type="bool" name="config_disableLockscreenByDefault" />
  <java-symbol type="bool" name="config_enableBurnInProtection" />
  <java-symbol type="bool" name="config_hotswapCapable" />
  <java-symbol type="bool" name="config_mms_content_disposition_support" />