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

Commit d31bacbb authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Disable long press to expand on shade on lockscreen" into main

parents 281b2de5 cccc95ab
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -2262,6 +2262,10 @@ public final class NotificationPanelViewController implements
    @Deprecated
    public void onStatusBarLongPress(MotionEvent event) {
        Log.i(TAG, "Status Bar was long pressed.");
        if (mBarState == KEYGUARD) {
            mShadeLog.d("Lockscreen Status Bar was long pressed. Expansion not supported.");
            return;
        }
        if (DISABLE_LONG_PRESS_EXPAND) {
            //TODO(b/394977231) delete this temporary workaround used only by tests
            Log.i(TAG, "Ignoring status Bar long press on virtualized test device.");
@@ -2277,18 +2281,12 @@ public final class NotificationPanelViewController implements
            if (isExpanded() && mBarState != KEYGUARD) {
                mShadeLog.d("Status Bar was long pressed. Expanding to QS.");
                mQsController.flingQs(0, FLING_EXPAND);
            } else {
                if (mBarState == KEYGUARD) {
                    mShadeLog.d("Lockscreen Status Bar was long pressed. Expanding to Notifications.");
                    mLockscreenShadeTransitionController.goToLockedShade(
                            /* expandedView= */null, /* needsQSAnimation= */true);
            } else {
                mShadeLog.d("Status Bar was long pressed. Expanding to Notifications.");
                expandToNotifications();
            }
        }
    }
    }

    @Override
    public int getBarState() {