Skip to content

Commit b3aba0f

Browse files
someone5678rmp22
authored andcommitted
core: Expose method to toggle recent apps through Binder
This is necessary in order to toggle recent apps from other system apps using platform APIs, which we need for implementing gestures in a modular way. Ref: "core: Expose method to start assistant through Binder" Change-Id: I1664c0618251a525697e73a2de0c8247a71dd27e
1 parent 2c1b444 commit b3aba0f

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

core/java/com/android/internal/statusbar/IStatusBarService.aidl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,9 @@ interface IStatusBarService
249249
* Starts the default assistant app.
250250
*/
251251
void startAssist(in Bundle args);
252+
253+
/**
254+
* Toggle recent apps.
255+
*/
256+
void toggleRecentApps();
252257
}

services/core/java/com/android/server/statusbar/StatusBarManagerService.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2783,6 +2783,18 @@ public void startAssist(Bundle args) {
27832783
}
27842784
}
27852785

2786+
@Override
2787+
public void toggleRecentApps() {
2788+
enforceStatusBarService();
2789+
if (mBar != null) {
2790+
try {
2791+
mBar.toggleRecentApps();
2792+
} catch (RemoteException e) {
2793+
Slog.e(TAG, "toggleRecentApps", e);
2794+
}
2795+
}
2796+
}
2797+
27862798
/** @hide */
27872799
public void passThroughShellCommand(String[] args, FileDescriptor fd) {
27882800
enforceStatusBarOrShell();

0 commit comments

Comments
 (0)