diff options
| author | Winson Chung <winsonc@google.com> | 2021-04-01 03:56:55 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-01 03:56:55 +0000 |
| commit | db41d72646940ec63277d757f390c663eed7942d (patch) | |
| tree | 3dcf742a6e874fd971a51ba8d4a831dde4fe6b79 /core/java/android | |
| parent | 3500d17499cf4b766c910942dd2f326da75bdbfa (diff) | |
| parent | 56dc2819907c287af74f4f1938361a919c4b2fa9 (diff) | |
Merge "Expose the full task info with the remote animation target" into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/RemoteAnimationTarget.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/core/java/android/view/RemoteAnimationTarget.java b/core/java/android/view/RemoteAnimationTarget.java index 14dcdad8e2b5..cdc099b8e2ea 100644 --- a/core/java/android/view/RemoteAnimationTarget.java +++ b/core/java/android/view/RemoteAnimationTarget.java @@ -34,7 +34,8 @@ import static android.view.RemoteAnimationTargetProto.WINDOW_CONFIGURATION; import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import android.annotation.IntDef; -import android.app.PictureInPictureParams; +import android.app.ActivityManager; +import android.app.TaskInfo; import android.app.WindowConfiguration; import android.compat.annotation.UnsupportedAppUsage; import android.graphics.Point; @@ -189,12 +190,11 @@ public class RemoteAnimationTarget implements Parcelable { public boolean isNotInRecents; /** - * {@link PictureInPictureParams} to allow launcher to determine if an app should - * automatically enter PiP on swiping up to home. + * {@link TaskInfo} to allow the controller to identify information about the task. * * TODO: add this to proto dump */ - public PictureInPictureParams pictureInPictureParams; + public ActivityManager.RunningTaskInfo taskInfo; /** * The {@link android.view.WindowManager.LayoutParams.WindowType} of this window. It's only used @@ -206,11 +206,10 @@ public class RemoteAnimationTarget implements Parcelable { Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, - SurfaceControl startLeash, Rect startBounds, - PictureInPictureParams pictureInPictureParams) { + SurfaceControl startLeash, Rect startBounds, ActivityManager.RunningTaskInfo taskInfo) { this(taskId, mode, leash, isTranslucent, clipRect, contentInsets, prefixOrderIndex, position, localBounds, screenSpaceBounds, windowConfig, isNotInRecents, startLeash, - startBounds, pictureInPictureParams, INVALID_WINDOW_TYPE); + startBounds, taskInfo, INVALID_WINDOW_TYPE); } public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, @@ -218,7 +217,7 @@ public class RemoteAnimationTarget implements Parcelable { Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, SurfaceControl startLeash, Rect startBounds, - PictureInPictureParams pictureInPictureParams, + ActivityManager.RunningTaskInfo taskInfo, @WindowManager.LayoutParams.WindowType int windowType) { this.mode = mode; this.taskId = taskId; @@ -235,7 +234,7 @@ public class RemoteAnimationTarget implements Parcelable { this.isNotInRecents = isNotInRecents; this.startLeash = startLeash; this.startBounds = startBounds == null ? null : new Rect(startBounds); - this.pictureInPictureParams = pictureInPictureParams; + this.taskInfo = taskInfo; this.windowType = windowType; } @@ -255,7 +254,7 @@ public class RemoteAnimationTarget implements Parcelable { isNotInRecents = in.readBoolean(); startLeash = in.readTypedObject(SurfaceControl.CREATOR); startBounds = in.readTypedObject(Rect.CREATOR); - pictureInPictureParams = in.readTypedObject(PictureInPictureParams.CREATOR); + taskInfo = in.readTypedObject(ActivityManager.RunningTaskInfo.CREATOR); windowType = in.readInt(); } @@ -281,7 +280,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeBoolean(isNotInRecents); dest.writeTypedObject(startLeash, 0 /* flags */); dest.writeTypedObject(startBounds, 0 /* flags */); - dest.writeTypedObject(pictureInPictureParams, 0 /* flags */); + dest.writeTypedObject(taskInfo, 0 /* flags */); dest.writeInt(windowType); } @@ -299,7 +298,7 @@ public class RemoteAnimationTarget implements Parcelable { pw.println(); pw.print(prefix); pw.print("windowConfiguration="); pw.println(windowConfiguration); pw.print(prefix); pw.print("leash="); pw.println(leash); - pw.print(prefix); pw.print("pictureInPictureParams="); pw.println(pictureInPictureParams); + pw.print(prefix); pw.print("taskInfo="); pw.println(taskInfo); pw.print(prefix); pw.print("windowType="); pw.print(windowType); } |
