Add onTaskMovedToFront to close floating views
Fixes a bug with allapps not being closed if the launching activity does
not trigger a onTaskStackChange callback. For example this is the case
when allapps launches a task in freeform mode. In this case the previous
task is still visible and won't be paused. The onTaskStackChange
callback is not triggered. Leaving the allapps view visible.
Bug: 259264346
Test: enable destop mode, open gmail, open allapps and open chrome,
observe allapps view is closed
Change-Id: I5e60baa15ebc04b5094a84ed977eb9f3bc73d4a6
diff --git a/quickstep/src/com/android/launcher3/taskbar/overlay/TaskbarOverlayController.java b/quickstep/src/com/android/launcher3/taskbar/overlay/TaskbarOverlayController.java
index 6c7bdbf..019e5a6 100644
--- a/quickstep/src/com/android/launcher3/taskbar/overlay/TaskbarOverlayController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/overlay/TaskbarOverlayController.java
@@ -61,6 +61,11 @@
public void onTaskStackChanged() {
mProxyView.close(false);
}
+
+ @Override
+ public void onTaskMovedToFront(int taskId) {
+ mProxyView.close(false);
+ }
};
private DeviceProfile mLauncherDeviceProfile;