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

Commit 191f9bad authored by Michal Brzezinski's avatar Michal Brzezinski Committed by Presubmit Automerger Backend
Browse files

[automerge] Fixing not responsive tiles in split shade 2p: c9be2225 2p: f7d1466f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17587087

Bug: 228198572
Change-Id: I05306de96af4a35b6218213b781803890688b6f7
Merged-In: I58feaa693dd3ef4081e49f279eba19251e9d1ab0
parents 914e285c f7d1466f
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
@@ -404,7 +404,7 @@ public class NotificationPanelViewController extends PanelViewController {
     * Determines if QS should be already expanded when expanding shade.
     * Determines if QS should be already expanded when expanding shade.
     * Used for split shade, two finger gesture as well as accessibility shortcut to QS.
     * Used for split shade, two finger gesture as well as accessibility shortcut to QS.
     */
     */
    private boolean mQsExpandImmediate;
    @VisibleForTesting boolean mQsExpandImmediate;
    private boolean mTwoFingerQsExpandPossible;
    private boolean mTwoFingerQsExpandPossible;
    private String mHeaderDebugInfo;
    private String mHeaderDebugInfo;


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


        initBottomArea();
        initBottomArea();


@@ -1993,9 +1991,6 @@ public class NotificationPanelViewController extends PanelViewController {
        if (!isFullyCollapsed()) {
        if (!isFullyCollapsed()) {
            return;
            return;
        }
        }
        if (mShouldUseSplitNotificationShade) {
            mQsExpandImmediate = true;
        }
        mExpectingSynthesizedDown = true;
        mExpectingSynthesizedDown = true;
        onTrackingStarted();
        onTrackingStarted();
        updatePanelExpanded();
        updatePanelExpanded();
@@ -3171,6 +3166,9 @@ public class NotificationPanelViewController extends PanelViewController {
        mFalsingCollector.onTrackingStarted(!mKeyguardStateController.canDismissLockScreen());
        mFalsingCollector.onTrackingStarted(!mKeyguardStateController.canDismissLockScreen());
        super.onTrackingStarted();
        super.onTrackingStarted();
        mScrimController.onTrackingStarted();
        mScrimController.onTrackingStarted();
        if (mShouldUseSplitNotificationShade) {
            mQsExpandImmediate = true;
        }
        if (mQsFullyExpanded) {
        if (mQsFullyExpanded) {
            mQsExpandImmediate = true;
            mQsExpandImmediate = true;
            setShowShelfOnly(true);
            setShowShelfOnly(true);
@@ -4875,7 +4873,6 @@ public class NotificationPanelViewController extends PanelViewController {
        public void onConfigurationChanged(Configuration newConfig) {
        public void onConfigurationChanged(Configuration newConfig) {
            super.onConfigurationChanged(newConfig);
            super.onConfigurationChanged(newConfig);
            mAffordanceHelper.onConfigurationChanged();
            mAffordanceHelper.onConfigurationChanged();
            mLastOrientation = newConfig.orientation;
        }
        }
    }
    }


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


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

        mNotificationPanelViewController.onTrackingStarted();

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

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