diff options
author | Winson Chung <winsonc@google.com> | 2019-06-13 22:30:33 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2019-06-13 22:33:29 -0700 |
commit | 4c59ddae35a8b9add51034db88b1444d68a54ff8 (patch) | |
tree | fffae7bd2ff1da535e16571e415f585a3742ab09 | |
parent | 552b3fe811857c475327ecc152f6923c822670f1 (diff) | |
download | android_packages_apps_Trebuchet-4c59ddae35a8b9add51034db88b1444d68a54ff8.tar.gz android_packages_apps_Trebuchet-4c59ddae35a8b9add51034db88b1444d68a54ff8.tar.bz2 android_packages_apps_Trebuchet-4c59ddae35a8b9add51034db88b1444d68a54ff8.zip |
Always use the locked input consumer when showing activity over lockscreen
- When there is no activity over the lockscreen, the validSysuiFlags
check already prevents falling into the base input consumer creation logic.
Bug: 131698448
Change-Id: I7154bc08db819574b78d375e3f9a36e610466dbc
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java | 11 |
1 files changed, 2 insertions, 9 deletions
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 3ace25ad6..769d207ab 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -37,7 +37,6 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_S import android.annotation.TargetApi; import android.app.ActivityManager; import android.app.ActivityManager.RunningTaskInfo; -import android.app.KeyguardManager; import android.app.Service; import android.content.BroadcastReceiver; import android.content.ComponentName; @@ -234,7 +233,6 @@ public class TouchInteractionService extends Service implements private final InputConsumer mResetGestureInputConsumer = new ResetGestureInputConsumer(mSwipeSharedState); - private KeyguardManager mKM; private ActivityManagerWrapper mAM; private RecentsModel mRecentsModel; private ISystemUiProxy mISystemUiProxy; @@ -280,7 +278,6 @@ public class TouchInteractionService extends Service implements // Initialize anything here that is needed in direct boot mode. // Everything else should be initialized in initWhenUserUnlocked() below. - mKM = getSystemService(KeyguardManager.class); mMainChoreographer = Choreographer.getInstance(); mAM = ActivityManagerWrapper.getInstance(); @@ -560,11 +557,8 @@ public class TouchInteractionService extends Service implements if (!useSharedState) { mSwipeSharedState.clearAllState(); } - if ((mSystemUiStateFlags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0 - || mKM.isDeviceLocked()) { - // This handles apps launched in direct boot mode (e.g. dialer) as well as apps launched - // while device is locked after exiting direct boot mode (e.g. camera), or if the - // app is showing over the lockscreen (even if not locked) + if ((mSystemUiStateFlags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0) { + // This handles apps showing over the lockscreen (e.g. camera) return createDeviceLockedInputConsumer(runningTaskInfo); } @@ -669,7 +663,6 @@ public class TouchInteractionService extends Service implements pw.println(" systemUiFlags=" + mSystemUiStateFlags); pw.println(" systemUiFlagsDesc=" + QuickStepContract.getSystemUiStateString(mSystemUiStateFlags)); - pw.println(" isDeviceLocked=" + mKM.isDeviceLocked()); pw.println(" assistantAvailable=" + mAssistantAvailable); pw.println(" assistantDisabled=" + QuickStepContract.isAssistantGestureDisabled(mSystemUiStateFlags)); |