summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Stetson <alexstetson@google.com> 2022-12-13 11:34:50 -0800
committer Alex Stetson <alexstetson@google.com> 2022-12-13 11:34:50 -0800
commite28a3b8fa2143d0a1c9d539bb57cffff4cf00b1b (patch)
tree38dbc5740c3bbe50ad35fa4ce808aa569f266514
parentaf2ba65d089adb13dd78e05a4a698f06a457a544 (diff)
Use consistent method to get current user
Depending on the timing of the switching actions, the KeyguardUpdateMonitor and the user tracker may have different current users. We should use a consistent method for getting the current user in the KeyguardViewMediator Bug: 250675259 Test: manual Change-Id: I2b078ac21f0546d1b8de24f55e4225a754d53aea
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 306e92e6c96c..0e1be009c94d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -722,7 +722,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
@Override
public void keyguardDone(boolean strongAuth, int targetUserId) {
- if (targetUserId != mUserTracker.getUserId()) {
+ if (targetUserId != KeyguardUpdateMonitor.getCurrentUser()) {
return;
}
if (DEBUG) Log.d(TAG, "keyguardDone");
@@ -745,7 +745,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
public void keyguardDonePending(boolean strongAuth, int targetUserId) {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending");
if (DEBUG) Log.d(TAG, "keyguardDonePending");
- if (targetUserId != mUserTracker.getUserId()) {
+ if (targetUserId != KeyguardUpdateMonitor.getCurrentUser()) {
Trace.endSection();
return;
}