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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user