Loading core/java/android/view/RemoteAnimationTarget.java +14 −3 Original line number Diff line number Diff line Loading @@ -196,6 +196,12 @@ public class RemoteAnimationTarget implements Parcelable { */ public ActivityManager.RunningTaskInfo taskInfo; /** * {@code true} if picture-in-picture permission is granted in {@link android.app.AppOpsManager} */ @UnsupportedAppUsage public boolean allowEnterPip; /** * The {@link android.view.WindowManager.LayoutParams.WindowType} of this window. It's only used * for non-app window. Loading @@ -206,10 +212,11 @@ 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, ActivityManager.RunningTaskInfo taskInfo) { SurfaceControl startLeash, Rect startBounds, ActivityManager.RunningTaskInfo taskInfo, boolean allowEnterPip) { this(taskId, mode, leash, isTranslucent, clipRect, contentInsets, prefixOrderIndex, position, localBounds, screenSpaceBounds, windowConfig, isNotInRecents, startLeash, startBounds, taskInfo, INVALID_WINDOW_TYPE); startBounds, taskInfo, allowEnterPip, INVALID_WINDOW_TYPE); } public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Loading @@ -217,7 +224,7 @@ public class RemoteAnimationTarget implements Parcelable { Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, SurfaceControl startLeash, Rect startBounds, ActivityManager.RunningTaskInfo taskInfo, ActivityManager.RunningTaskInfo taskInfo, boolean allowEnterPip, @WindowManager.LayoutParams.WindowType int windowType) { this.mode = mode; this.taskId = taskId; Loading @@ -235,6 +242,7 @@ public class RemoteAnimationTarget implements Parcelable { this.startLeash = startLeash; this.startBounds = startBounds == null ? null : new Rect(startBounds); this.taskInfo = taskInfo; this.allowEnterPip = allowEnterPip; this.windowType = windowType; } Loading @@ -255,6 +263,7 @@ public class RemoteAnimationTarget implements Parcelable { startLeash = in.readTypedObject(SurfaceControl.CREATOR); startBounds = in.readTypedObject(Rect.CREATOR); taskInfo = in.readTypedObject(ActivityManager.RunningTaskInfo.CREATOR); allowEnterPip = in.readBoolean(); windowType = in.readInt(); } Loading @@ -281,6 +290,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeTypedObject(startLeash, 0 /* flags */); dest.writeTypedObject(startBounds, 0 /* flags */); dest.writeTypedObject(taskInfo, 0 /* flags */); dest.writeBoolean(allowEnterPip); dest.writeInt(windowType); } Loading @@ -299,6 +309,7 @@ public class RemoteAnimationTarget implements Parcelable { pw.print(prefix); pw.print("windowConfiguration="); pw.println(windowConfiguration); pw.print(prefix); pw.print("leash="); pw.println(leash); pw.print(prefix); pw.print("taskInfo="); pw.println(taskInfo); pw.print(prefix); pw.print("allowEnterPip="); pw.println(allowEnterPip); pw.print(prefix); pw.print("windowType="); pw.print(windowType); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −1 Original line number Diff line number Diff line Loading @@ -1125,7 +1125,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, null /* contentInsets */, Integer.MAX_VALUE /* prefixOrderIndex */, new android.graphics.Point(0, 0) /* position */, bounds, bounds, new WindowConfiguration(), true, null /* startLeash */, null /* startBounds */, null /* taskInfo */, TYPE_DOCK_DIVIDER); null /* taskInfo */, false /* allowEnterPip */, TYPE_DOCK_DIVIDER); } @Override Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public class RemoteAnimationTargetCompat { public final boolean isNotInRecents; public final Rect contentInsets; public final ActivityManager.RunningTaskInfo taskInfo; public final boolean allowEnterPip; public final int rotationChange; public final int windowType; Loading @@ -88,6 +89,7 @@ public class RemoteAnimationTargetCompat { contentInsets = app.contentInsets; activityType = app.windowConfiguration.getActivityType(); taskInfo = app.taskInfo; allowEnterPip = app.allowEnterPip; rotationChange = 0; mStartLeash = app.startLeash; Loading Loading @@ -214,6 +216,7 @@ public class RemoteAnimationTargetCompat { activityType = ACTIVITY_TYPE_UNDEFINED; } taskInfo = change.getTaskInfo(); allowEnterPip = false; /* always false in shell-transition case */ mStartLeash = null; rotationChange = change.getEndRotation() - change.getStartRotation(); windowType = INVALID_WINDOW_TYPE; Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public class KeyguardService extends Service { info.getChanges().size() - i, new Point(), localBounds, new Rect(change.getEndAbsBounds()), windowConfiguration, isNotInRecents, null /* startLeash */, change.getStartAbsBounds(), taskInfo)); change.getStartAbsBounds(), taskInfo, false /* allowEnterPip */)); } return out.toArray(new RemoteAnimationTarget[out.size()]); } Loading packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { return RemoteAnimationTarget( 0, RemoteAnimationTarget.MODE_OPENING, SurfaceControl(), false, Rect(), Rect(), 0, Point(), Rect(), bounds, WindowConfiguration(), false, SurfaceControl(), Rect(), taskInfo taskInfo, false ) } } Loading Loading
core/java/android/view/RemoteAnimationTarget.java +14 −3 Original line number Diff line number Diff line Loading @@ -196,6 +196,12 @@ public class RemoteAnimationTarget implements Parcelable { */ public ActivityManager.RunningTaskInfo taskInfo; /** * {@code true} if picture-in-picture permission is granted in {@link android.app.AppOpsManager} */ @UnsupportedAppUsage public boolean allowEnterPip; /** * The {@link android.view.WindowManager.LayoutParams.WindowType} of this window. It's only used * for non-app window. Loading @@ -206,10 +212,11 @@ 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, ActivityManager.RunningTaskInfo taskInfo) { SurfaceControl startLeash, Rect startBounds, ActivityManager.RunningTaskInfo taskInfo, boolean allowEnterPip) { this(taskId, mode, leash, isTranslucent, clipRect, contentInsets, prefixOrderIndex, position, localBounds, screenSpaceBounds, windowConfig, isNotInRecents, startLeash, startBounds, taskInfo, INVALID_WINDOW_TYPE); startBounds, taskInfo, allowEnterPip, INVALID_WINDOW_TYPE); } public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Loading @@ -217,7 +224,7 @@ public class RemoteAnimationTarget implements Parcelable { Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, SurfaceControl startLeash, Rect startBounds, ActivityManager.RunningTaskInfo taskInfo, ActivityManager.RunningTaskInfo taskInfo, boolean allowEnterPip, @WindowManager.LayoutParams.WindowType int windowType) { this.mode = mode; this.taskId = taskId; Loading @@ -235,6 +242,7 @@ public class RemoteAnimationTarget implements Parcelable { this.startLeash = startLeash; this.startBounds = startBounds == null ? null : new Rect(startBounds); this.taskInfo = taskInfo; this.allowEnterPip = allowEnterPip; this.windowType = windowType; } Loading @@ -255,6 +263,7 @@ public class RemoteAnimationTarget implements Parcelable { startLeash = in.readTypedObject(SurfaceControl.CREATOR); startBounds = in.readTypedObject(Rect.CREATOR); taskInfo = in.readTypedObject(ActivityManager.RunningTaskInfo.CREATOR); allowEnterPip = in.readBoolean(); windowType = in.readInt(); } Loading @@ -281,6 +290,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeTypedObject(startLeash, 0 /* flags */); dest.writeTypedObject(startBounds, 0 /* flags */); dest.writeTypedObject(taskInfo, 0 /* flags */); dest.writeBoolean(allowEnterPip); dest.writeInt(windowType); } Loading @@ -299,6 +309,7 @@ public class RemoteAnimationTarget implements Parcelable { pw.print(prefix); pw.print("windowConfiguration="); pw.println(windowConfiguration); pw.print(prefix); pw.print("leash="); pw.println(leash); pw.print(prefix); pw.print("taskInfo="); pw.println(taskInfo); pw.print(prefix); pw.print("allowEnterPip="); pw.println(allowEnterPip); pw.print(prefix); pw.print("windowType="); pw.print(windowType); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −1 Original line number Diff line number Diff line Loading @@ -1125,7 +1125,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, null /* contentInsets */, Integer.MAX_VALUE /* prefixOrderIndex */, new android.graphics.Point(0, 0) /* position */, bounds, bounds, new WindowConfiguration(), true, null /* startLeash */, null /* startBounds */, null /* taskInfo */, TYPE_DOCK_DIVIDER); null /* taskInfo */, false /* allowEnterPip */, TYPE_DOCK_DIVIDER); } @Override Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public class RemoteAnimationTargetCompat { public final boolean isNotInRecents; public final Rect contentInsets; public final ActivityManager.RunningTaskInfo taskInfo; public final boolean allowEnterPip; public final int rotationChange; public final int windowType; Loading @@ -88,6 +89,7 @@ public class RemoteAnimationTargetCompat { contentInsets = app.contentInsets; activityType = app.windowConfiguration.getActivityType(); taskInfo = app.taskInfo; allowEnterPip = app.allowEnterPip; rotationChange = 0; mStartLeash = app.startLeash; Loading Loading @@ -214,6 +216,7 @@ public class RemoteAnimationTargetCompat { activityType = ACTIVITY_TYPE_UNDEFINED; } taskInfo = change.getTaskInfo(); allowEnterPip = false; /* always false in shell-transition case */ mStartLeash = null; rotationChange = change.getEndRotation() - change.getStartRotation(); windowType = INVALID_WINDOW_TYPE; Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public class KeyguardService extends Service { info.getChanges().size() - i, new Point(), localBounds, new Rect(change.getEndAbsBounds()), windowConfiguration, isNotInRecents, null /* startLeash */, change.getStartAbsBounds(), taskInfo)); change.getStartAbsBounds(), taskInfo, false /* allowEnterPip */)); } return out.toArray(new RemoteAnimationTarget[out.size()]); } Loading
packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { return RemoteAnimationTarget( 0, RemoteAnimationTarget.MODE_OPENING, SurfaceControl(), false, Rect(), Rect(), 0, Point(), Rect(), bounds, WindowConfiguration(), false, SurfaceControl(), Rect(), taskInfo taskInfo, false ) } } Loading