Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff9fe09b authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Use device locked input consumer when an activity is showing when...

Merge "Use device locked input consumer when an activity is showing when locked" into ub-launcher3-qt-dev
parents f17eb616 ed6a3ead
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_N
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED;

import android.annotation.TargetApi;
import android.app.ActivityManager;
@@ -543,9 +545,11 @@ public class TouchInteractionService extends Service implements
        if (!useSharedState) {
            mSwipeSharedState.clearAllState();
        }
        if (mKM.isDeviceLocked()) {
        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 even after exiting direct boot mode (e.g. camera).
            // 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)
            return createDeviceLockedInputConsumer(runningTaskInfo);
        }