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