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

Commit e28a3b8f authored by Alex Stetson's avatar Alex Stetson
Browse files

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
parent af2ba65d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
            }