Use USER_LIFECYCLE_EVENT_TYPE_SWITCHING to detect user switched event.

SWITCHING and SWITCHED would be sent consecutively on the same thread,
and so creating a USER_LIFECYCLE_EVENT_TYPE_SWITCHED event has been
determined to be redundant.

See b/153745017 for more details.

Bug: 153379372
Test: Manual
Change-Id: Iaabb7a8b31f7a5e4a46cbe4d7ea683b06756404e
This commit is contained in:
kwaky
2020-04-16 09:37:34 -07:00
parent 31b94bfc1e
commit 43bde21c87

View File

@@ -92,7 +92,7 @@ public class CarKeyguardViewController extends OverlayViewController implements
}
};
private final CarUserManager.UserLifecycleListener mUserLifecycleListener = (e) -> {
if (e.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_UNLOCKED) {
if (e.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING) {
revealKeyguardIfBouncerPrepared();
}
};