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

Commit a423661c authored by Eugene Susla's avatar Eugene Susla Committed by android-build-merger
Browse files

Merge "[DO NOT MERGE] Fix a11y action "expand notifications" when QS is open" into pi-dev

am: a60cb524

Change-Id: Icf6d083068b7a5ae60bcd35ad0b17eb5e62e4728
parents 7b24cbc4 a60cb524
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -659,6 +659,14 @@ public class NotificationPanelView extends PanelView implements
        expand(true /* animate */);
    }

    public void expandWithoutQs() {
        if (isQsExpanded()) {
            flingSettings(0 /* velocity */, false /* expand */);
        } else {
            expand(true /* animate */);
        }
    }

    @Override
    public void fling(float vel, boolean expand) {
        GestureRecorder gr = ((PhoneStatusBarView) mBar).mBar.getGestureRecorder();
+1 −1
Original line number Diff line number Diff line
@@ -2298,7 +2298,7 @@ public class StatusBar extends SystemUI implements DemoMode,
            return ;
        }

        mNotificationPanel.expand(true /* animate */);
        mNotificationPanel.expandWithoutQs();

        if (false) postStartTracing();
    }
+3 −3
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ public class StatusBarTest extends SysuiTestCase {

        mMetricsLogger = new FakeMetricsLogger();
        mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
        mNotificationLogger = new NotificationLogger();
        mDependency.injectTestDependency(NotificationLogger.class, mNotificationLogger);
        mNotificationLogger = new NotificationLogger();

        IPowerManager powerManagerService = mock(IPowerManager.class);
        HandlerThread handlerThread = new HandlerThread("TestThread");
@@ -524,9 +524,9 @@ public class StatusBarTest extends SysuiTestCase {
        mStatusBar.disable(StatusBarManager.DISABLE_NONE, StatusBarManager.DISABLE2_NONE, false);
        verify(mNotificationPanelView).setQsExpansionEnabled(true);
        mStatusBar.animateExpandNotificationsPanel();
        verify(mNotificationPanelView).expand(anyBoolean());
        verify(mNotificationPanelView).expandWithoutQs();
        mStatusBar.animateExpandSettingsPanel(null);
        verify(mNotificationPanelView).expand(anyBoolean());
        verify(mNotificationPanelView).expandWithQs();
    }

    @Test