Fix bug with app pair 10:90 launch
Small fix for supporting the 10:90 split ratio. Previously, we detected the leftTop app by checking for left == 0 or top == 0; this led to a crash on app pair launch for 10:90 because, for example, the left pair's left bound was negative. Now we check for left <= 0 or top <= 0 instead.
Bug: 391866990
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: Visually correct when a 90:10 pair goes to recents and back
Change-Id: Ie22c12ea547b6d2dfeea4570ec32a79040cc45c2
diff --git a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt
index 9b4c772..0182969 100644
--- a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt
+++ b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt
@@ -749,8 +749,8 @@
// launcher side animation)
val leftTopApp =
leafRoots.single { change ->
- (isLeftRightSplit && change.endAbsBounds.left == 0) ||
- (!isLeftRightSplit && change.endAbsBounds.top == 0)
+ (isLeftRightSplit && change.endAbsBounds.left <= 0) ||
+ (!isLeftRightSplit && change.endAbsBounds.top <= 0)
}
val dividerPos =
if (isLeftRightSplit) leftTopApp.endAbsBounds.right