summaryrefslogtreecommitdiff
path: root/packages/SystemUI
diff options
context:
space:
mode:
author Rubin Xu <rubinxu@google.com> 2023-04-21 09:12:26 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-04-21 09:12:26 +0000
commit96e515913d49b3969795bf987ab8c45eab3ef51b (patch)
treef2e8b43a24ded5d1f74cec6b43b73dd0d1dfdd8d /packages/SystemUI
parenta49fd177134fe3a9449e4145e27fdfbb800fb74e (diff)
parentc5f429f0b67c9057dfa641a5e709fce68a7822dd (diff)
Merge "Headless: fix locking work profile with separate challenge on power button" into udc-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 7a2013e2c612..93ddfba5b6fc 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1610,8 +1610,9 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
}
private void doKeyguardLaterForChildProfilesLocked() {
- UserManager um = UserManager.get(mContext);
- for (int profileId : um.getEnabledProfileIds(UserHandle.myUserId())) {
+ for (UserInfo profile : mUserTracker.getUserProfiles()) {
+ if (!profile.isEnabled()) continue;
+ final int profileId = profile.id;
if (mLockPatternUtils.isSeparateProfileChallengeEnabled(profileId)) {
long userTimeout = getLockTimeout(profileId);
if (userTimeout == 0) {
@@ -1634,8 +1635,9 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
}
private void doKeyguardForChildProfilesLocked() {
- UserManager um = UserManager.get(mContext);
- for (int profileId : um.getEnabledProfileIds(UserHandle.myUserId())) {
+ for (UserInfo profile : mUserTracker.getUserProfiles()) {
+ if (!profile.isEnabled()) continue;
+ final int profileId = profile.id;
if (mLockPatternUtils.isSeparateProfileChallengeEnabled(profileId)) {
lockProfile(profileId);
}