Loading core/java/android/view/WindowManager.java +7 −1 Original line number Diff line number Diff line Loading @@ -399,6 +399,11 @@ public interface WindowManager extends ViewManager { * @hide */ int TRANSIT_PIP = 10; /** * The screen is turning on. * @hide */ int TRANSIT_WAKE = 11; /** * The first slot for custom transition types. Callers (like Shell) can make use of custom * transition types for dealing with special cases. These types are effectively ignored by Loading @@ -408,7 +413,7 @@ public interface WindowManager extends ViewManager { * implementation. * @hide */ int TRANSIT_FIRST_CUSTOM = 11; int TRANSIT_FIRST_CUSTOM = 12; /** * @hide Loading @@ -425,6 +430,7 @@ public interface WindowManager extends ViewManager { TRANSIT_KEYGUARD_OCCLUDE, TRANSIT_KEYGUARD_UNOCCLUDE, TRANSIT_PIP, TRANSIT_WAKE, TRANSIT_FIRST_CUSTOM }) @Retention(RetentionPolicy.SOURCE) Loading core/java/android/window/TransitionFilter.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.window; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.view.WindowManager.TransitionType; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -52,7 +53,7 @@ public final class TransitionFilter implements Parcelable { * When non-null: this is a list of transition types that this filter applies to. This filter * will fail for transitions that aren't one of these types. */ @Nullable public int[] mTypeSet = null; @Nullable public @TransitionType int[] mTypeSet = null; /** * A list of required changes. To pass, a transition must meet all requirements. Loading core/java/android/window/TransitionInfo.java +6 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.TransitionFlags; import static android.view.WindowManager.TransitionType; import static android.view.WindowManager.transitTypeToString; import android.annotation.IntDef; Loading @@ -42,7 +44,6 @@ import android.os.Parcel; import android.os.Parcelable; import android.view.Surface; import android.view.SurfaceControl; import android.view.WindowManager; import java.util.ArrayList; import java.util.List; Loading Loading @@ -106,8 +107,8 @@ public final class TransitionInfo implements Parcelable { }) public @interface ChangeFlags {} private final @WindowManager.TransitionOldType int mType; private final @WindowManager.TransitionFlags int mFlags; private final @TransitionType int mType; private final @TransitionFlags int mFlags; private final ArrayList<Change> mChanges = new ArrayList<>(); private SurfaceControl mRootLeash; Loading @@ -116,8 +117,7 @@ public final class TransitionInfo implements Parcelable { private AnimationOptions mOptions; /** @hide */ public TransitionInfo(@WindowManager.TransitionOldType int type, @WindowManager.TransitionFlags int flags) { public TransitionInfo(@TransitionType int type, @TransitionFlags int flags) { mType = type; mFlags = flags; } Loading Loading @@ -173,7 +173,7 @@ public final class TransitionInfo implements Parcelable { mOptions = options; } public int getType() { public @TransitionType int getType() { return mType; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +10 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.util.ArrayMap; import android.view.Choreographer; import android.view.SurfaceControl; import android.view.SurfaceSession; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.Transformation; Loading Loading @@ -132,6 +133,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { @NonNull Transitions.TransitionFinishCallback finishCallback) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "start default transition animation, info = %s", info); // Fallback for screen wake. This just immediately finishes since there is no // animation for screen-wake. if (info.getType() == WindowManager.TRANSIT_WAKE) { startTransaction.apply(); finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */); return true; } if (mAnimations.containsKey(transition)) { throw new IllegalStateException("Got a duplicate startAnimation call for " + transition); Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Checking filter %s", mFilters.get(i)); if (mFilters.get(i).first.matches(info)) { Slog.d(TAG, "Found filter" + mFilters.get(i)); pendingRemote = mFilters.get(i).second; // Add to requested list so that it can be found for merge requests. mRequestedRemotes.put(transition, pendingRemote); Loading Loading
core/java/android/view/WindowManager.java +7 −1 Original line number Diff line number Diff line Loading @@ -399,6 +399,11 @@ public interface WindowManager extends ViewManager { * @hide */ int TRANSIT_PIP = 10; /** * The screen is turning on. * @hide */ int TRANSIT_WAKE = 11; /** * The first slot for custom transition types. Callers (like Shell) can make use of custom * transition types for dealing with special cases. These types are effectively ignored by Loading @@ -408,7 +413,7 @@ public interface WindowManager extends ViewManager { * implementation. * @hide */ int TRANSIT_FIRST_CUSTOM = 11; int TRANSIT_FIRST_CUSTOM = 12; /** * @hide Loading @@ -425,6 +430,7 @@ public interface WindowManager extends ViewManager { TRANSIT_KEYGUARD_OCCLUDE, TRANSIT_KEYGUARD_UNOCCLUDE, TRANSIT_PIP, TRANSIT_WAKE, TRANSIT_FIRST_CUSTOM }) @Retention(RetentionPolicy.SOURCE) Loading
core/java/android/window/TransitionFilter.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.window; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.view.WindowManager.TransitionType; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -52,7 +53,7 @@ public final class TransitionFilter implements Parcelable { * When non-null: this is a list of transition types that this filter applies to. This filter * will fail for transitions that aren't one of these types. */ @Nullable public int[] mTypeSet = null; @Nullable public @TransitionType int[] mTypeSet = null; /** * A list of required changes. To pass, a transition must meet all requirements. Loading
core/java/android/window/TransitionInfo.java +6 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.TransitionFlags; import static android.view.WindowManager.TransitionType; import static android.view.WindowManager.transitTypeToString; import android.annotation.IntDef; Loading @@ -42,7 +44,6 @@ import android.os.Parcel; import android.os.Parcelable; import android.view.Surface; import android.view.SurfaceControl; import android.view.WindowManager; import java.util.ArrayList; import java.util.List; Loading Loading @@ -106,8 +107,8 @@ public final class TransitionInfo implements Parcelable { }) public @interface ChangeFlags {} private final @WindowManager.TransitionOldType int mType; private final @WindowManager.TransitionFlags int mFlags; private final @TransitionType int mType; private final @TransitionFlags int mFlags; private final ArrayList<Change> mChanges = new ArrayList<>(); private SurfaceControl mRootLeash; Loading @@ -116,8 +117,7 @@ public final class TransitionInfo implements Parcelable { private AnimationOptions mOptions; /** @hide */ public TransitionInfo(@WindowManager.TransitionOldType int type, @WindowManager.TransitionFlags int flags) { public TransitionInfo(@TransitionType int type, @TransitionFlags int flags) { mType = type; mFlags = flags; } Loading Loading @@ -173,7 +173,7 @@ public final class TransitionInfo implements Parcelable { mOptions = options; } public int getType() { public @TransitionType int getType() { return mType; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +10 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.util.ArrayMap; import android.view.Choreographer; import android.view.SurfaceControl; import android.view.SurfaceSession; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.Transformation; Loading Loading @@ -132,6 +133,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { @NonNull Transitions.TransitionFinishCallback finishCallback) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "start default transition animation, info = %s", info); // Fallback for screen wake. This just immediately finishes since there is no // animation for screen-wake. if (info.getType() == WindowManager.TRANSIT_WAKE) { startTransaction.apply(); finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */); return true; } if (mAnimations.containsKey(transition)) { throw new IllegalStateException("Got a duplicate startAnimation call for " + transition); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Checking filter %s", mFilters.get(i)); if (mFilters.get(i).first.matches(info)) { Slog.d(TAG, "Found filter" + mFilters.get(i)); pendingRemote = mFilters.get(i).second; // Add to requested list so that it can be found for merge requests. mRequestedRemotes.put(transition, pendingRemote); Loading