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

Commit a549d1d2 authored by Shuming Hao's avatar Shuming Hao
Browse files

Implement toggle notification panel for new buttons in taskbar

This CL adds toggle notification panel function for new buttons in Kingyo taskbar.

Bug: 199333223
Test: m, verify that clicking the new buttons will expand/collapse quick settings and notification panel

Recall: http://recall/clips/993bc14b-98a7-4d7d-98c4-17ba271d4da9
Change-Id: Iacec5b4aa1ea6d89e084c0a7c91ee62d2bbba8ae
parent 1544cd3c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -155,5 +155,10 @@ interface ISystemUiProxy {
     */
    void onImeSwitcherPressed() = 49;

    // Next id = 50
    /**
     * Notifies to toggle notification panel.
     */
    void toggleNotificationPanel() = 50;

    // Next id = 51
}
+7 −0
Original line number Diff line number Diff line
@@ -400,6 +400,13 @@ public class OverviewProxyService extends CurrentUserTracker implements
                    () -> mCommandQueue.handleSystemKey(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN));
        }

        @Override
        public void toggleNotificationPanel() {
            verifyCallerAndClearCallingIdentityPostMain("toggleNotificationPanel", () ->
                    mStatusBarOptionalLazy.get().ifPresent(StatusBar::togglePanel));
        }


        private boolean verifyCaller(String reason) {
            final int callerId = Binder.getCallingUserHandle().getIdentifier();
            if (callerId != mCurrentBoundedUserId) {
+4 −0
Original line number Diff line number Diff line
@@ -434,6 +434,10 @@ public class StatusBar extends CoreStartable implements
        mCommandQueueCallbacks.animateCollapsePanels(flags, force);
    }

    /** */
    public void togglePanel() {
        mCommandQueueCallbacks.togglePanel();
    }
    /**
     * The {@link StatusBarState} of the status bar.
     */