Pass displayId to startSwipePipToHome
so that PiP can calculate bounds for the correct display in multidisplay
case.
Bug: 390042201
Test: Manual and Presubmits
Flag: com.android.window.flags.enable_connected_displays_pip
Change-Id: I1dbecc36d287a9b64e614cf9c4621aef3c57b284
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 124be41..cf0c61a 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1827,9 +1827,7 @@
final Rect hotseatKeepClearArea = getKeepClearAreaForHotseat();
final Rect destinationBounds = SystemUiProxy.INSTANCE.get(mContext)
- .startSwipePipToHome(taskInfo.topActivity,
- taskInfo.topActivityInfo,
- runningTaskTarget.taskInfo.pictureInPictureParams,
+ .startSwipePipToHome(taskInfo,
homeRotation,
hotseatKeepClearArea);
if (destinationBounds == null) {
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.kt b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
index 75694af..b5883c7 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.kt
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
@@ -19,11 +19,9 @@
import android.app.ActivityManager.RunningTaskInfo
import android.app.ActivityOptions
import android.app.PendingIntent
-import android.app.PictureInPictureParams
import android.content.ComponentName
import android.content.Context
import android.content.Intent
-import android.content.pm.ActivityInfo
import android.content.pm.ShortcutInfo
import android.graphics.Point
import android.graphics.Rect
@@ -497,20 +495,12 @@
/** @return Destination bounds of auto-pip animation, `null` if the animation is not ready. */
fun startSwipePipToHome(
- componentName: ComponentName?,
- activityInfo: ActivityInfo?,
- pictureInPictureParams: PictureInPictureParams?,
+ taskInfo: RunningTaskInfo,
launcherRotation: Int,
hotseatKeepClearArea: Rect?,
): Rect? {
executeWithErrorLog({ "Failed call startSwipePipToHome" }) {
- return pip?.startSwipePipToHome(
- componentName,
- activityInfo,
- pictureInPictureParams,
- launcherRotation,
- hotseatKeepClearArea,
- )
+ return pip?.startSwipePipToHome(taskInfo, launcherRotation, hotseatKeepClearArea)
}
return null
}