Merge "Implement toggle notification panel for new buttons in taskbar"

This commit is contained in:
Shuming Hao
2021-12-15 16:49:19 +00:00
committed by Android (Google) Code Review
3 changed files with 17 additions and 1 deletions

View File

@@ -155,5 +155,10 @@ interface ISystemUiProxy {
*/
void onImeSwitcherPressed() = 49;
// Next id = 50
/**
* Notifies to toggle notification panel.
*/
void toggleNotificationPanel() = 50;
// Next id = 51
}

View File

@@ -404,6 +404,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) {

View File

@@ -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.
*/