diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java index 7c6c7ac121..ce0dbb7862 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java @@ -687,6 +687,20 @@ public class TaskbarManager { } } + /** + * Signal from SysUI indicating that a non-mirroring display was just connected to the + * primary device. + */ + public void onDisplayReady(int displayId) { + } + + /** + * Signal from SysUI indicating that a previously connected non-mirroring display was just + * removed from the primary device. + */ + public void onDisplayRemoved(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 f7fb18b542..15f320d6c6 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -299,6 +299,22 @@ public class TouchInteractionService extends Service { }); } + @BinderThread + @Override + public void onDisplayReady(int displayId) { + MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService( + tis -> executeForTaskbarManager( + taskbarManager -> taskbarManager.onDisplayReady(displayId)))); + } + + @BinderThread + @Override + public void onDisplayRemoved(int displayId) { + MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService( + tis -> executeForTaskbarManager( + taskbarManager -> taskbarManager.onDisplayRemoved(displayId)))); + } + @BinderThread @Override public void updateWallpaperVisibility(int displayId, boolean visible) {