From 779bd3cd466cc1ca6f0167abe4cb73384968ee52 Mon Sep 17 00:00:00 2001 From: Lingyu Feng Date: Thu, 23 Jan 2025 01:30:20 -0800 Subject: [PATCH] Add onDisplayRemoveSystemDecorations to TouchInteractionService onDisplayRemoveSystemDecorations() is a new method in IOverviewProxy.aidl Bug: 352461502 Flag: com.android.server.display.feature.flags.enable_display_content_mode_management Test: manually (adb shell settings put secure mirror_built_in_display {1|0}) Change-Id: I42d96ef27fd62d35ae1ca6134bd74752de3a2b5d --- .../com/android/launcher3/taskbar/TaskbarManager.java | 5 +++++ .../android/quickstep/TouchInteractionService.java | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java index 21c8255a37..13f72cd2f0 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java @@ -701,6 +701,11 @@ public class TaskbarManager { public void onDisplayRemoved(int displayId) { } + /** + * Signal from SysUI indicating that system decorations should be removed from the display. + */ + public void onDisplayRemoveSystemDecorations(int displayId) {} + private void removeActivityCallbacksAndListeners() { if (mActivity != null) { mActivity.removeOnDeviceProfileChangeListener(mDebugActivityDeviceProfileChanged); diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 15f320d6c6..33ba780a0a 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -315,6 +315,17 @@ public class TouchInteractionService extends Service { taskbarManager -> taskbarManager.onDisplayRemoved(displayId)))); } + @BinderThread + @Override + public void onDisplayRemoveSystemDecorations(int displayId) { + // TODO(b/391786915): Replace all + // `executeForTouchInteractionService(executeForTaskbarManager())` with just + // `executeForTaskbarManager` directly (since `tis` is unused). + MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService( + tis -> executeForTaskbarManager(taskbarManager -> taskbarManager + .onDisplayRemoveSystemDecorations(displayId)))); + } + @BinderThread @Override public void updateWallpaperVisibility(int displayId, boolean visible) {