Loading core/java/android/view/RemoteAnimationTarget.java +10 −0 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 static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import android.annotation.ColorInt; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.TaskInfo; Loading Loading @@ -221,6 +222,12 @@ public class RemoteAnimationTarget implements Parcelable { */ public boolean hasAnimatingParent; /** * The background color of animation in case the task info is not available if the transition * is activity level. */ public @ColorInt int backgroundColor; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect localBounds, Rect screenSpaceBounds, Loading Loading @@ -279,6 +286,7 @@ public class RemoteAnimationTarget implements Parcelable { allowEnterPip = in.readBoolean(); windowType = in.readInt(); hasAnimatingParent = in.readBoolean(); backgroundColor = in.readInt(); } @Override Loading Loading @@ -307,6 +315,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeBoolean(allowEnterPip); dest.writeInt(windowType); dest.writeBoolean(hasAnimatingParent); dest.writeInt(backgroundColor); } public void dump(PrintWriter pw, String prefix) { Loading @@ -327,6 +336,7 @@ public class RemoteAnimationTarget implements Parcelable { pw.print(prefix); pw.print("allowEnterPip="); pw.println(allowEnterPip); pw.print(prefix); pw.print("windowType="); pw.print(windowType); pw.print(prefix); pw.print("hasAnimatingParent="); pw.print(hasAnimatingParent); pw.print(prefix); pw.print("backgroundColor="); pw.print(backgroundColor); } public void dumpDebug(ProtoOutputStream proto, long fieldId) { Loading packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +2 −1 Original line number Diff line number Diff line Loading @@ -432,7 +432,8 @@ class ActivityLaunchAnimator( right = windowBounds.right ) val callback = this@ActivityLaunchAnimator.callback!! val windowBackgroundColor = callback.getBackgroundColor(window.taskInfo) val windowBackgroundColor = window.taskInfo?.let { callback.getBackgroundColor(it) } ?: window.backgroundColor // Make sure we use the modified timings when animating a dialog into an app. val launchAnimator = if (controller.isDialogLaunch) { Loading packages/SystemUI/animation/src/com/android/systemui/animation/RemoteTransitionAdapter.kt +3 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ class RemoteTransitionAdapter { info: TransitionInfo, t: SurfaceControl.Transaction ): RemoteAnimationTarget { return RemoteAnimationTarget( val target = RemoteAnimationTarget( /* taskId */ if (change.taskInfo != null) change.taskInfo!!.taskId else -1, /* mode */ newModeToLegacyMode(change.mode), /* leash */ createLeash(info, change, order, t), Loading @@ -160,6 +160,8 @@ class RemoteTransitionAdapter { /* taskInfo */ change.taskInfo, /* allowEnterPip */ change.allowEnterPip, /* windowType */ WindowManager.LayoutParams.INVALID_WINDOW_TYPE) target.backgroundColor = change.backgroundColor return target } /** Loading Loading
core/java/android/view/RemoteAnimationTarget.java +10 −0 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 static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import android.annotation.ColorInt; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.TaskInfo; Loading Loading @@ -221,6 +222,12 @@ public class RemoteAnimationTarget implements Parcelable { */ public boolean hasAnimatingParent; /** * The background color of animation in case the task info is not available if the transition * is activity level. */ public @ColorInt int backgroundColor; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect localBounds, Rect screenSpaceBounds, Loading Loading @@ -279,6 +286,7 @@ public class RemoteAnimationTarget implements Parcelable { allowEnterPip = in.readBoolean(); windowType = in.readInt(); hasAnimatingParent = in.readBoolean(); backgroundColor = in.readInt(); } @Override Loading Loading @@ -307,6 +315,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeBoolean(allowEnterPip); dest.writeInt(windowType); dest.writeBoolean(hasAnimatingParent); dest.writeInt(backgroundColor); } public void dump(PrintWriter pw, String prefix) { Loading @@ -327,6 +336,7 @@ public class RemoteAnimationTarget implements Parcelable { pw.print(prefix); pw.print("allowEnterPip="); pw.println(allowEnterPip); pw.print(prefix); pw.print("windowType="); pw.print(windowType); pw.print(prefix); pw.print("hasAnimatingParent="); pw.print(hasAnimatingParent); pw.print(prefix); pw.print("backgroundColor="); pw.print(backgroundColor); } public void dumpDebug(ProtoOutputStream proto, long fieldId) { Loading
packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +2 −1 Original line number Diff line number Diff line Loading @@ -432,7 +432,8 @@ class ActivityLaunchAnimator( right = windowBounds.right ) val callback = this@ActivityLaunchAnimator.callback!! val windowBackgroundColor = callback.getBackgroundColor(window.taskInfo) val windowBackgroundColor = window.taskInfo?.let { callback.getBackgroundColor(it) } ?: window.backgroundColor // Make sure we use the modified timings when animating a dialog into an app. val launchAnimator = if (controller.isDialogLaunch) { Loading
packages/SystemUI/animation/src/com/android/systemui/animation/RemoteTransitionAdapter.kt +3 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ class RemoteTransitionAdapter { info: TransitionInfo, t: SurfaceControl.Transaction ): RemoteAnimationTarget { return RemoteAnimationTarget( val target = RemoteAnimationTarget( /* taskId */ if (change.taskInfo != null) change.taskInfo!!.taskId else -1, /* mode */ newModeToLegacyMode(change.mode), /* leash */ createLeash(info, change, order, t), Loading @@ -160,6 +160,8 @@ class RemoteTransitionAdapter { /* taskInfo */ change.taskInfo, /* allowEnterPip */ change.allowEnterPip, /* windowType */ WindowManager.LayoutParams.INVALID_WINDOW_TYPE) target.backgroundColor = change.backgroundColor return target } /** Loading