From 9bbbe9cc1457485a376be639dc34ddcd19bc92e5 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 10 Apr 2019 12:48:25 -0700 Subject: [PATCH] Use DeviceLockedInputConsumer if !mIsUserUnlocked There's an edge case where user isn't unlocked even if device is. In that case, we still need to use DeviceLockedInputConsumer because variables needed for any other input consumer aren't initialized until the user is unlocked. Bug: 129947426 Change-Id: I33a5e9a8d5c4266d45bd0d5a16657fa3c9644a1f --- .../src/com/android/quickstep/TouchInteractionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java index 79f0c36efd..3194189e80 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -412,7 +412,7 @@ public class TouchInteractionService extends Service implements private InputConsumer newConsumer(boolean useSharedState, MotionEvent event) { // TODO: this makes a binder call every touch down. we should move to a listener pattern. - if (mKM.isDeviceLocked()) { + if (!mIsUserUnlocked || mKM.isDeviceLocked()) { // This handles apps launched in direct boot mode (e.g. dialer) as well as apps launched // while device is locked even after exiting direct boot mode (e.g. camera). return new DeviceLockedInputConsumer(this);