Merge "Send app bounds to Shell via stopSwipePipToHome" into main

This commit is contained in:
Ikram Gabiyev
2024-01-09 06:34:29 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 3 deletions
@@ -1572,7 +1572,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
mSwipePipToHomeAnimator.getTaskId(),
mSwipePipToHomeAnimator.getComponentName(),
mSwipePipToHomeAnimator.getDestinationBounds(),
mSwipePipToHomeAnimator.getContentOverlay());
mSwipePipToHomeAnimator.getContentOverlay(),
mSwipePipToHomeAnimator.getAppBounds());
windowAnim = mSwipePipToHomeAnimators;
} else {
@@ -630,10 +630,11 @@ public class SystemUiProxy implements ISystemUiProxy {
* should be responsible for cleaning up the overlay.
*/
public void stopSwipePipToHome(int taskId, ComponentName componentName, Rect destinationBounds,
SurfaceControl overlay) {
SurfaceControl overlay, Rect appBounds) {
if (mPip != null) {
try {
mPip.stopSwipePipToHome(taskId, componentName, destinationBounds, overlay);
mPip.stopSwipePipToHome(taskId, componentName, destinationBounds, overlay,
appBounds);
} catch (RemoteException e) {
Log.w(TAG, "Failed call stopSwipePipToHome");
}
@@ -264,6 +264,10 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
return mDestinationBounds;
}
public Rect getAppBounds() {
return mAppBounds;
}
@Nullable
public SurfaceControl getContentOverlay() {
return mPipContentOverlay == null ? null : mPipContentOverlay.getLeash();