1/ Fixing docked task animation when entering split screen from home
- Update the minimized state when docking an app from home to ensure that
the animation of the docked task goes to the right bounds
- Temporarily block the invocation of the old recents activity when showing
recents as a part of setting the windowing mode of another task (this is
fine right now because quickstep only allows docking via the UI and not
from the nav bar while another task is open).
- Add proto field so we can determine whether to check the recents activity
from the split screen CTS tests
- Also fix issue with invisible docked task due to wrong bounds calculated
due to launcher not notifying the divider of the first docked frame
Bug: 73118672
Test: go/wm-smoke
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerSplitScreenTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerTransitionSelectionTests
Change-Id: Ib1208501c311de009a9e706103134865c521cb63
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 46c59c5..1f1efc4 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -620,7 +620,12 @@
if (wasMinimized && mMinimizedDock && containsAppInDockedStack(openingApps)
&& appTransition != TRANSIT_NONE &&
!AppTransition.isKeyguardGoingAwayTransit(appTransition)) {
- mService.showRecentApps();
+ if (mService.mAmInternal.isRecentsComponentHomeActivity(mService.mCurrentUserId)) {
+ // When the home activity is the recents component and we are already minimized,
+ // then there is nothing to do here since home is already visible
+ } else {
+ mService.showRecentApps();
+ }
}
}
@@ -641,7 +646,7 @@
return mMinimizedDock;
}
- private void checkMinimizeChanged(boolean animate) {
+ void checkMinimizeChanged(boolean animate) {
if (mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility() == null) {
return;
}
@@ -693,7 +698,7 @@
final boolean imeChanged = clearImeAdjustAnimation();
boolean minimizedChange = false;
if (isHomeStackResizable()) {
- notifyDockedStackMinimizedChanged(minimizedDock, true /* animate */,
+ notifyDockedStackMinimizedChanged(minimizedDock, animate,
true /* isHomeStackResizable */);
minimizedChange = true;
} else {