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
This commit is contained in:
Merissa Mitchell
2025-01-15 04:16:12 +00:00
parent af8990f9b0
commit ac97f98e7c
2 changed files with 3 additions and 15 deletions
@@ -1827,9 +1827,7 @@ public abstract class AbsSwipeUpHandler<
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) {
@@ -19,11 +19,9 @@ import android.app.ActivityManager
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 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context:
/** @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
}