Loading core/java/com/android/internal/widget/LockPatternUtils.java +15 −1 Original line number Diff line number Diff line Loading @@ -27,11 +27,13 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.UserInfo; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.IMountService; import android.os.storage.StorageManager; import android.provider.Settings; Loading Loading @@ -499,7 +501,19 @@ public class LockPatternUtils { * @return true if lock screen is can be disabled */ public boolean isLockScreenDisabled() { return !isSecure() && getLong(DISABLE_LOCKSCREEN_KEY, 0) != 0; if (!isSecure() && getLong(DISABLE_LOCKSCREEN_KEY, 0) != 0) { // Check if the number of switchable users forces the lockscreen. final List<UserInfo> users = UserManager.get(mContext).getUsers(true); final int userCount = users.size(); int switchableUsers = 0; for (int i = 0; i < userCount; i++) { if (users.get(i).supportsSwitchTo()) { switchableUsers++; } } return switchableUsers < 2; } return false; } /** Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −2 Original line number Diff line number Diff line Loading @@ -683,8 +683,7 @@ public class KeyguardViewMediator extends SystemUI { } private void maybeSendUserPresentBroadcast() { if (mSystemReady && mLockPatternUtils.isLockScreenDisabled() && !mUserManager.isUserSwitcherEnabled()) { if (mSystemReady && mLockPatternUtils.isLockScreenDisabled()) { // Lock screen is disabled because the user has set the preference to "None". // In this case, send out ACTION_USER_PRESENT here instead of in // handleKeyguardDone() Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +15 −1 Original line number Diff line number Diff line Loading @@ -27,11 +27,13 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.UserInfo; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.IMountService; import android.os.storage.StorageManager; import android.provider.Settings; Loading Loading @@ -499,7 +501,19 @@ public class LockPatternUtils { * @return true if lock screen is can be disabled */ public boolean isLockScreenDisabled() { return !isSecure() && getLong(DISABLE_LOCKSCREEN_KEY, 0) != 0; if (!isSecure() && getLong(DISABLE_LOCKSCREEN_KEY, 0) != 0) { // Check if the number of switchable users forces the lockscreen. final List<UserInfo> users = UserManager.get(mContext).getUsers(true); final int userCount = users.size(); int switchableUsers = 0; for (int i = 0; i < userCount; i++) { if (users.get(i).supportsSwitchTo()) { switchableUsers++; } } return switchableUsers < 2; } return false; } /** Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −2 Original line number Diff line number Diff line Loading @@ -683,8 +683,7 @@ public class KeyguardViewMediator extends SystemUI { } private void maybeSendUserPresentBroadcast() { if (mSystemReady && mLockPatternUtils.isLockScreenDisabled() && !mUserManager.isUserSwitcherEnabled()) { if (mSystemReady && mLockPatternUtils.isLockScreenDisabled()) { // Lock screen is disabled because the user has set the preference to "None". // In this case, send out ACTION_USER_PRESENT here instead of in // handleKeyguardDone() Loading