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

Commit c9be2225 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing not responsive tiles in split shade

This is one of the fixes for not responsive bottom row of tiles, which makes sure that expanded shade is set properly.
Expanded shade state is ensured by setting mQsExpandImmediate once we start expanding shade. This was set only in startWaitingForOpenPanelGesture and it doesn't cover some gestures (like swiping from the top), so I moved setting mQsExpandImmediate to more generic onTrackingStarted which should be called in more cases when shade starts to expand.

Bug: 228198572
Test: On homescreen expand shade pulling from status bar and see if most bottom row of tiles (when 9 tiles are visible) is functioning correctly
Change-Id: I58feaa693dd3ef4081e49f279eba19251e9d1ab0
Merged-In: I58feaa693dd3ef4081e49f279eba19251e9d1ab0
parent 3336a902
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ public class NotificationPanelViewController extends PanelViewController {
     * Determines if QS should be already expanded when expanding shade.
     * Used for split shade, two finger gesture as well as accessibility shortcut to QS.
     */
    private boolean mQsExpandImmediate;
    @VisibleForTesting boolean mQsExpandImmediate;
    private boolean mTwoFingerQsExpandPossible;
    private String mHeaderDebugInfo;

@@ -430,7 +430,6 @@ public class NotificationPanelViewController extends PanelViewController {
    private boolean mExpandingFromHeadsUp;
    private boolean mCollapsedOnDown;
    private int mPositionMinSideMargin;
    private int mLastOrientation = -1;
    private boolean mClosingWithAlphaFadeOut;
    private boolean mHeadsUpAnimatingAway;
    private boolean mLaunchingAffordance;
@@ -955,7 +954,6 @@ public class NotificationPanelViewController extends PanelViewController {
        mKeyguardBottomArea = mView.findViewById(R.id.keyguard_bottom_area);
        mPreviewContainer = mView.findViewById(R.id.preview_container);
        mKeyguardBottomArea.setPreviewContainer(mPreviewContainer);
        mLastOrientation = mResources.getConfiguration().orientation;

        initBottomArea();

@@ -1994,9 +1992,6 @@ public class NotificationPanelViewController extends PanelViewController {
        if (!isFullyCollapsed()) {
            return;
        }
        if (mShouldUseSplitNotificationShade) {
            mQsExpandImmediate = true;
        }
        mExpectingSynthesizedDown = true;
        onTrackingStarted();
        updatePanelExpanded();
@@ -3172,6 +3167,9 @@ public class NotificationPanelViewController extends PanelViewController {
        mFalsingCollector.onTrackingStarted(!mKeyguardStateController.canDismissLockScreen());
        super.onTrackingStarted();
        mScrimController.onTrackingStarted();
        if (mShouldUseSplitNotificationShade) {
            mQsExpandImmediate = true;
        }
        if (mQsFullyExpanded) {
            mQsExpandImmediate = true;
            setShowShelfOnly(true);
@@ -4876,7 +4874,6 @@ public class NotificationPanelViewController extends PanelViewController {
        public void onConfigurationChanged(Configuration newConfig) {
            super.onConfigurationChanged(newConfig);
            mAffordanceHelper.onConfigurationChanged();
            mLastOrientation = newConfig.orientation;
        }
    }

+9 −0
Original line number Diff line number Diff line
@@ -947,6 +947,15 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
        verify(mKeyguardStatusBarViewController).setAlpha(statusBarAlpha);
    }

    @Test
    public void testQsToBeImmediatelyExpandedInSplitShade() {
        enableSplitShade(/* enabled= */ true);

        mNotificationPanelViewController.onTrackingStarted();

        assertThat(mNotificationPanelViewController.mQsExpandImmediate).isTrue();
    }

    private void triggerPositionClockAndNotifications() {
        mNotificationPanelViewController.closeQs();
    }