Always notify SystemUI when launching activity to existing task
- SysUI can determine what to do based on the type of activity launched
(ie. expand PIP/Bubbles to fullscreen)
Bug: 148977481
Test: atest TaskStackChangedListenerTest
Test: Launch app in split primary, ensure launching app again triggers
recents
Test: Launch app in PIP, ensure launching app again triggers it to go
fullscreen
Test: Launch app in bubble, ensure launching app again triggers bubble
to expand
Change-Id: I754a71a72dd0e660930b19acbf9fe6ccbb453152
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 8ada3c3..9267907 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -127,7 +127,12 @@
}
@Override
- public void onPinnedActivityRestartAttempt(boolean clearedTask) {
+ public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
+ boolean homeTaskVisible, boolean clearedTask) {
+ if (task.configuration.windowConfiguration.getWindowingMode()
+ != WINDOWING_MODE_PINNED) {
+ return;
+ }
mTouchHandler.getMotionHelper().expandPip(clearedTask /* skipAnimation */);
}
};