Loading core/java/android/view/WindowManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,12 @@ public interface WindowManager extends ViewManager { * @hide */ int TRANSIT_SLEEP = 12; /** * An Activity was going to be visible from back navigation. * @hide */ int TRANSIT_PREPARE_BACK_NAVIGATION = 13; /** * 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 Loading @@ -505,6 +511,7 @@ public interface WindowManager extends ViewManager { TRANSIT_PIP, TRANSIT_WAKE, TRANSIT_SLEEP, TRANSIT_PREPARE_BACK_NAVIGATION, TRANSIT_FIRST_CUSTOM }) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -1918,6 +1925,7 @@ public interface WindowManager extends ViewManager { case TRANSIT_PIP: return "PIP"; case TRANSIT_WAKE: return "WAKE"; case TRANSIT_SLEEP: return "SLEEP"; case TRANSIT_PREPARE_BACK_NAVIGATION: return "PREDICTIVE_BACK"; case TRANSIT_FIRST_CUSTOM: return "FIRST_CUSTOM"; default: if (type > TRANSIT_FIRST_CUSTOM) { Loading core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -209,3 +209,13 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "migrate_predictive_back_transition" namespace: "windowing_frontend" description: "Create transition when visibility change from predictive back" bug: "347168362" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +302 −6 File changed.Preview size limit exceeded, changes collapsed. Show changes libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +4 −2 Original line number Diff line number Diff line Loading @@ -375,7 +375,8 @@ public abstract class WMShellBaseModule { @ShellBackgroundThread Handler backgroundHandler, BackAnimationBackground backAnimationBackground, Optional<ShellBackAnimationRegistry> shellBackAnimationRegistry, ShellCommandHandler shellCommandHandler) { ShellCommandHandler shellCommandHandler, Transitions transitions) { if (BackAnimationController.IS_ENABLED) { return shellBackAnimationRegistry.map( (animations) -> Loading @@ -387,7 +388,8 @@ public abstract class WMShellBaseModule { context, backAnimationBackground, animations, shellCommandHandler)); shellCommandHandler, transitions)); } return Optional.empty(); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +3 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPI import static com.android.window.flags.Flags.ensureWallpaperInTransitions; import static com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary; import static com.android.window.flags.Flags.migratePredictiveBackTransition; import static com.android.wm.shell.shared.TransitionUtil.isClosingType; import static com.android.wm.shell.shared.TransitionUtil.isOpeningType; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_SHELL_TRANSITIONS; Loading Loading @@ -821,7 +822,8 @@ public class Transitions implements RemoteCallable<Transitions>, } // The change has already animated by back gesture, don't need to play transition // animation on it. if (change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) { if (!migratePredictiveBackTransition() && change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) { info.getChanges().remove(i); } } Loading Loading
core/java/android/view/WindowManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,12 @@ public interface WindowManager extends ViewManager { * @hide */ int TRANSIT_SLEEP = 12; /** * An Activity was going to be visible from back navigation. * @hide */ int TRANSIT_PREPARE_BACK_NAVIGATION = 13; /** * 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 Loading @@ -505,6 +511,7 @@ public interface WindowManager extends ViewManager { TRANSIT_PIP, TRANSIT_WAKE, TRANSIT_SLEEP, TRANSIT_PREPARE_BACK_NAVIGATION, TRANSIT_FIRST_CUSTOM }) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -1918,6 +1925,7 @@ public interface WindowManager extends ViewManager { case TRANSIT_PIP: return "PIP"; case TRANSIT_WAKE: return "WAKE"; case TRANSIT_SLEEP: return "SLEEP"; case TRANSIT_PREPARE_BACK_NAVIGATION: return "PREDICTIVE_BACK"; case TRANSIT_FIRST_CUSTOM: return "FIRST_CUSTOM"; default: if (type > TRANSIT_FIRST_CUSTOM) { Loading
core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -209,3 +209,13 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "migrate_predictive_back_transition" namespace: "windowing_frontend" description: "Create transition when visibility change from predictive back" bug: "347168362" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } }
libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +302 −6 File changed.Preview size limit exceeded, changes collapsed. Show changes
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +4 −2 Original line number Diff line number Diff line Loading @@ -375,7 +375,8 @@ public abstract class WMShellBaseModule { @ShellBackgroundThread Handler backgroundHandler, BackAnimationBackground backAnimationBackground, Optional<ShellBackAnimationRegistry> shellBackAnimationRegistry, ShellCommandHandler shellCommandHandler) { ShellCommandHandler shellCommandHandler, Transitions transitions) { if (BackAnimationController.IS_ENABLED) { return shellBackAnimationRegistry.map( (animations) -> Loading @@ -387,7 +388,8 @@ public abstract class WMShellBaseModule { context, backAnimationBackground, animations, shellCommandHandler)); shellCommandHandler, transitions)); } return Optional.empty(); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +3 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPI import static com.android.window.flags.Flags.ensureWallpaperInTransitions; import static com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary; import static com.android.window.flags.Flags.migratePredictiveBackTransition; import static com.android.wm.shell.shared.TransitionUtil.isClosingType; import static com.android.wm.shell.shared.TransitionUtil.isOpeningType; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_SHELL_TRANSITIONS; Loading Loading @@ -821,7 +822,8 @@ public class Transitions implements RemoteCallable<Transitions>, } // The change has already animated by back gesture, don't need to play transition // animation on it. if (change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) { if (!migratePredictiveBackTransition() && change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) { info.getChanges().remove(i); } } Loading