Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +5 −8 Original line number Original line Diff line number Diff line Loading @@ -513,14 +513,11 @@ public class NotificationLockscreenUserManagerImpl implements boolean isProfilePublic = devicePublic; boolean isProfilePublic = devicePublic; boolean needsSeparateChallenge = mLockPatternUtils.isSeparateProfileChallengeEnabled( boolean needsSeparateChallenge = mLockPatternUtils.isSeparateProfileChallengeEnabled( userId); userId); if (!devicePublic && userId != getCurrentUserId()) { if (!devicePublic && userId != getCurrentUserId() // We can't rely on KeyguardManager#isDeviceLocked() for unified profile challenge && needsSeparateChallenge && isSecure(userId)) { // due to a race condition where this code could be called before // Keyguard.isDeviceLocked is updated asynchronously, assume that all profiles // TrustManagerService updates its internal records, resulting in an incorrect // with separate challenge are locked when keyguard is visible to avoid race. // state being cached in mLockscreenPublicMode. (b/35951989) isProfilePublic = showingKeyguard || mKeyguardManager.isDeviceLocked(userId); if (needsSeparateChallenge && isSecure(userId)) { isProfilePublic = mKeyguardManager.isDeviceLocked(userId); } } } setLockscreenPublicMode(isProfilePublic, userId); setLockscreenPublicMode(isProfilePublic, userId); mUsersWithSeperateWorkChallenge.put(userId, needsSeparateChallenge); mUsersWithSeperateWorkChallenge.put(userId, needsSeparateChallenge); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +5 −8 Original line number Original line Diff line number Diff line Loading @@ -513,14 +513,11 @@ public class NotificationLockscreenUserManagerImpl implements boolean isProfilePublic = devicePublic; boolean isProfilePublic = devicePublic; boolean needsSeparateChallenge = mLockPatternUtils.isSeparateProfileChallengeEnabled( boolean needsSeparateChallenge = mLockPatternUtils.isSeparateProfileChallengeEnabled( userId); userId); if (!devicePublic && userId != getCurrentUserId()) { if (!devicePublic && userId != getCurrentUserId() // We can't rely on KeyguardManager#isDeviceLocked() for unified profile challenge && needsSeparateChallenge && isSecure(userId)) { // due to a race condition where this code could be called before // Keyguard.isDeviceLocked is updated asynchronously, assume that all profiles // TrustManagerService updates its internal records, resulting in an incorrect // with separate challenge are locked when keyguard is visible to avoid race. // state being cached in mLockscreenPublicMode. (b/35951989) isProfilePublic = showingKeyguard || mKeyguardManager.isDeviceLocked(userId); if (needsSeparateChallenge && isSecure(userId)) { isProfilePublic = mKeyguardManager.isDeviceLocked(userId); } } } setLockscreenPublicMode(isProfilePublic, userId); setLockscreenPublicMode(isProfilePublic, userId); mUsersWithSeperateWorkChallenge.put(userId, needsSeparateChallenge); mUsersWithSeperateWorkChallenge.put(userId, needsSeparateChallenge); Loading