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

Commit 2de69553 authored by Eugene Susla's avatar Eugene Susla
Browse files

[DO NOT MERGE] Fix a11y action "expand notifications" when QS is open

Fixes: 23486398
Test: ensure attached bug is fixed
Change-Id: I34eb265615fb26c86351d45f27227f4009ce2d09
(cherry picked from commit ec0710e3)
parent 56e9c026
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -652,6 +652,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
@@ -2313,7 +2313,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
@@ -161,8 +161,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");
@@ -514,9 +514,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