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

Commit cccc95ab authored by Justin Weir's avatar Justin Weir
Browse files

Disable long press to expand on shade on lockscreen

Long press works on an unlocked phone, but it only works the first
time on Lockscreen with the recent slate of flags enabled, after
which it expands to a broken state. Once we figure out why this is
happening, we will re-enable it.

Bug: 407098346
Test: Manual
Flag: com.android.systemui.shade_expands_on_status_bar_long_press
Change-Id: I043321dce8561c8cff51572d83d64ebcf67a6178
parent 1606ecb5
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -2263,6 +2263,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.");
@@ -2278,18 +2282,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() {