Loading core/java/android/app/PictureInPictureParams.java +10 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,16 @@ public final class PictureInPictureParams implements Parcelable { out.writeBoolean(mAutoEnterEnabled); } @Override public String toString() { return "PictureInPictureParams(" + " aspectRatio=" + getAspectRatioRational() + " sourceRectHint=" + getSourceRectHint() + " hasSetActions=" + hasSetActions() + " isAutoPipEnabled=" + isAutoEnterEnabled() + ")"; } public static final @android.annotation.NonNull Creator<PictureInPictureParams> CREATOR = new Creator<PictureInPictureParams>() { public PictureInPictureParams createFromParcel(Parcel in) { Loading core/java/android/view/RemoteAnimationTarget.java +15 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static android.view.RemoteAnimationTargetProto.TASK_ID; import static android.view.RemoteAnimationTargetProto.WINDOW_CONFIGURATION; import android.annotation.IntDef; import android.app.PictureInPictureParams; import android.app.WindowConfiguration; import android.compat.annotation.UnsupportedAppUsage; import android.graphics.Point; Loading Loading @@ -185,11 +186,20 @@ public class RemoteAnimationTarget implements Parcelable { @UnsupportedAppUsage public boolean isNotInRecents; /** * {@link PictureInPictureParams} to allow launcher to determine if an app should * automatically enter PiP on swiping up to home. * * TODO: add this to proto dump */ public PictureInPictureParams pictureInPictureParams; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, SurfaceControl startLeash, Rect startBounds) { SurfaceControl startLeash, Rect startBounds, PictureInPictureParams pictureInPictureParams) { this.mode = mode; this.taskId = taskId; this.leash = leash; Loading @@ -205,6 +215,7 @@ public class RemoteAnimationTarget implements Parcelable { this.isNotInRecents = isNotInRecents; this.startLeash = startLeash; this.startBounds = startBounds == null ? null : new Rect(startBounds); this.pictureInPictureParams = pictureInPictureParams; } public RemoteAnimationTarget(Parcel in) { Loading @@ -223,6 +234,7 @@ public class RemoteAnimationTarget implements Parcelable { isNotInRecents = in.readBoolean(); startLeash = in.readParcelable(null); startBounds = in.readParcelable(null); pictureInPictureParams = in.readParcelable(null); } @Override Loading @@ -247,6 +259,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeBoolean(isNotInRecents); dest.writeParcelable(startLeash, 0 /* flags */); dest.writeParcelable(startBounds, 0 /* flags */); dest.writeParcelable(pictureInPictureParams, 0 /* flags */); } public void dump(PrintWriter pw, String prefix) { Loading @@ -263,6 +276,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); } public void dumpDebug(ProtoOutputStream proto, long fieldId) { Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shared.system; import android.app.PictureInPictureParams; import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; Loading Loading @@ -49,6 +50,7 @@ public class RemoteAnimationTargetCompat { public final Rect screenSpaceBounds; public final boolean isNotInRecents; public final Rect contentInsets; public final PictureInPictureParams pictureInPictureParams; private final SurfaceControl mStartLeash; Loading @@ -66,6 +68,7 @@ public class RemoteAnimationTargetCompat { isNotInRecents = app.isNotInRecents; contentInsets = app.contentInsets; activityType = app.windowConfiguration.getActivityType(); pictureInPictureParams = app.pictureInPictureParams; mStartLeash = app.startLeash; } Loading services/core/java/com/android/server/wm/ActivityRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -7864,6 +7864,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final Rect insets = new Rect(); mainWindow.getContentInsets(insets); InsetUtils.addInsets(insets, getLetterboxInsets()); return new RemoteAnimationTarget(task.mTaskId, record.getMode(), record.mAdapter.mCapturedLeash, !fillsParent(), new Rect(), insets, Loading @@ -7871,7 +7872,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A record.mAdapter.mStackBounds, task.getWindowConfiguration(), false /*isNotInRecents*/, record.mThumbnailAdapter != null ? record.mThumbnailAdapter.mCapturedLeash : null, record.mStartBounds); record.mStartBounds, task.getPictureInPictureParams()); } @Override Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +1 −1 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ public class RecentsAnimationController implements DeathRecipient { !topApp.fillsParent(), new Rect(), insets, mTask.getPrefixOrderIndex(), new Point(mBounds.left, mBounds.top), mLocalBounds, mBounds, mTask.getWindowConfiguration(), mIsRecentTaskInvisible, null, null); mIsRecentTaskInvisible, null, null, mTask.getPictureInPictureParams()); return mTarget; } Loading Loading
core/java/android/app/PictureInPictureParams.java +10 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,16 @@ public final class PictureInPictureParams implements Parcelable { out.writeBoolean(mAutoEnterEnabled); } @Override public String toString() { return "PictureInPictureParams(" + " aspectRatio=" + getAspectRatioRational() + " sourceRectHint=" + getSourceRectHint() + " hasSetActions=" + hasSetActions() + " isAutoPipEnabled=" + isAutoEnterEnabled() + ")"; } public static final @android.annotation.NonNull Creator<PictureInPictureParams> CREATOR = new Creator<PictureInPictureParams>() { public PictureInPictureParams createFromParcel(Parcel in) { Loading
core/java/android/view/RemoteAnimationTarget.java +15 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static android.view.RemoteAnimationTargetProto.TASK_ID; import static android.view.RemoteAnimationTargetProto.WINDOW_CONFIGURATION; import android.annotation.IntDef; import android.app.PictureInPictureParams; import android.app.WindowConfiguration; import android.compat.annotation.UnsupportedAppUsage; import android.graphics.Point; Loading Loading @@ -185,11 +186,20 @@ public class RemoteAnimationTarget implements Parcelable { @UnsupportedAppUsage public boolean isNotInRecents; /** * {@link PictureInPictureParams} to allow launcher to determine if an app should * automatically enter PiP on swiping up to home. * * TODO: add this to proto dump */ public PictureInPictureParams pictureInPictureParams; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect localBounds, Rect screenSpaceBounds, WindowConfiguration windowConfig, boolean isNotInRecents, SurfaceControl startLeash, Rect startBounds) { SurfaceControl startLeash, Rect startBounds, PictureInPictureParams pictureInPictureParams) { this.mode = mode; this.taskId = taskId; this.leash = leash; Loading @@ -205,6 +215,7 @@ public class RemoteAnimationTarget implements Parcelable { this.isNotInRecents = isNotInRecents; this.startLeash = startLeash; this.startBounds = startBounds == null ? null : new Rect(startBounds); this.pictureInPictureParams = pictureInPictureParams; } public RemoteAnimationTarget(Parcel in) { Loading @@ -223,6 +234,7 @@ public class RemoteAnimationTarget implements Parcelable { isNotInRecents = in.readBoolean(); startLeash = in.readParcelable(null); startBounds = in.readParcelable(null); pictureInPictureParams = in.readParcelable(null); } @Override Loading @@ -247,6 +259,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeBoolean(isNotInRecents); dest.writeParcelable(startLeash, 0 /* flags */); dest.writeParcelable(startBounds, 0 /* flags */); dest.writeParcelable(pictureInPictureParams, 0 /* flags */); } public void dump(PrintWriter pw, String prefix) { Loading @@ -263,6 +276,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); } public void dumpDebug(ProtoOutputStream proto, long fieldId) { Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shared.system; import android.app.PictureInPictureParams; import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; Loading Loading @@ -49,6 +50,7 @@ public class RemoteAnimationTargetCompat { public final Rect screenSpaceBounds; public final boolean isNotInRecents; public final Rect contentInsets; public final PictureInPictureParams pictureInPictureParams; private final SurfaceControl mStartLeash; Loading @@ -66,6 +68,7 @@ public class RemoteAnimationTargetCompat { isNotInRecents = app.isNotInRecents; contentInsets = app.contentInsets; activityType = app.windowConfiguration.getActivityType(); pictureInPictureParams = app.pictureInPictureParams; mStartLeash = app.startLeash; } Loading
services/core/java/com/android/server/wm/ActivityRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -7864,6 +7864,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final Rect insets = new Rect(); mainWindow.getContentInsets(insets); InsetUtils.addInsets(insets, getLetterboxInsets()); return new RemoteAnimationTarget(task.mTaskId, record.getMode(), record.mAdapter.mCapturedLeash, !fillsParent(), new Rect(), insets, Loading @@ -7871,7 +7872,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A record.mAdapter.mStackBounds, task.getWindowConfiguration(), false /*isNotInRecents*/, record.mThumbnailAdapter != null ? record.mThumbnailAdapter.mCapturedLeash : null, record.mStartBounds); record.mStartBounds, task.getPictureInPictureParams()); } @Override Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +1 −1 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ public class RecentsAnimationController implements DeathRecipient { !topApp.fillsParent(), new Rect(), insets, mTask.getPrefixOrderIndex(), new Point(mBounds.left, mBounds.top), mLocalBounds, mBounds, mTask.getWindowConfiguration(), mIsRecentTaskInvisible, null, null); mIsRecentTaskInvisible, null, null, mTask.getPictureInPictureParams()); return mTarget; } Loading