Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −10 Original line number Diff line number Diff line Loading @@ -2108,7 +2108,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, // Use normal animations. return false; } else if (mMixedHandler != null && hasDisplayChange(info)) { } else if (mMixedHandler != null && Transitions.hasDisplayChange(info)) { // A display-change has been un-expectedly inserted into the transition. Redirect // handling to the mixed-handler to deal with splitting it up. if (mMixedHandler.animatePendingSplitWithDisplayChange(transition, info, Loading Loading @@ -2151,15 +2151,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, return true; } private boolean hasDisplayChange(TransitionInfo info) { boolean has = false; for (int iC = 0; iC < info.getChanges().size() && !has; ++iC) { final TransitionInfo.Change change = info.getChanges().get(iC); has = change.getMode() == TRANSIT_CHANGE && (change.getFlags() & FLAG_IS_DISPLAY) != 0; } return has; } /** Called to clean-up state and do house-keeping after the animation is done. */ public void onTransitionAnimationComplete() { // If still playing, let it finish. Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,11 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { @NonNull SurfaceControl.Transaction startTransaction, @NonNull SurfaceControl.Transaction finishTransaction, @NonNull Transitions.TransitionFinishCallback finishCallback) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && Transitions.hasDisplayChange(info)) { // Note that if the remote doesn't have permission ACCESS_SURFACE_FLINGER, some // operations of the start transaction may be ignored. return false; } RemoteTransition pendingRemote = mRequestedRemotes.get(transition); if (pendingRemote == null) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Transition %s doesn't have " Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ 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.fixScale; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_OCCLUDED; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_NO_ANIMATION; Loading Loading @@ -328,6 +329,17 @@ public class Transitions implements RemoteCallable<Transitions> { return type == TRANSIT_CLOSE || type == TRANSIT_TO_BACK; } /** Returns {@code true} if the transition has a display change. */ public static boolean hasDisplayChange(@NonNull TransitionInfo info) { for (int i = info.getChanges().size() - 1; i >= 0; --i) { final TransitionInfo.Change change = info.getChanges().get(i); if (change.getMode() == TRANSIT_CHANGE && change.hasFlags(FLAG_IS_DISPLAY)) { return true; } } return false; } /** * Sets up visibility/alpha/transforms to resemble the starting state of an animation. */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −10 Original line number Diff line number Diff line Loading @@ -2108,7 +2108,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, // Use normal animations. return false; } else if (mMixedHandler != null && hasDisplayChange(info)) { } else if (mMixedHandler != null && Transitions.hasDisplayChange(info)) { // A display-change has been un-expectedly inserted into the transition. Redirect // handling to the mixed-handler to deal with splitting it up. if (mMixedHandler.animatePendingSplitWithDisplayChange(transition, info, Loading Loading @@ -2151,15 +2151,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, return true; } private boolean hasDisplayChange(TransitionInfo info) { boolean has = false; for (int iC = 0; iC < info.getChanges().size() && !has; ++iC) { final TransitionInfo.Change change = info.getChanges().get(iC); has = change.getMode() == TRANSIT_CHANGE && (change.getFlags() & FLAG_IS_DISPLAY) != 0; } return has; } /** Called to clean-up state and do house-keeping after the animation is done. */ public void onTransitionAnimationComplete() { // If still playing, let it finish. Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,11 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { @NonNull SurfaceControl.Transaction startTransaction, @NonNull SurfaceControl.Transaction finishTransaction, @NonNull Transitions.TransitionFinishCallback finishCallback) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && Transitions.hasDisplayChange(info)) { // Note that if the remote doesn't have permission ACCESS_SURFACE_FLINGER, some // operations of the start transaction may be ignored. return false; } RemoteTransition pendingRemote = mRequestedRemotes.get(transition); if (pendingRemote == null) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Transition %s doesn't have " Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ 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.fixScale; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_OCCLUDED; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_NO_ANIMATION; Loading Loading @@ -328,6 +329,17 @@ public class Transitions implements RemoteCallable<Transitions> { return type == TRANSIT_CLOSE || type == TRANSIT_TO_BACK; } /** Returns {@code true} if the transition has a display change. */ public static boolean hasDisplayChange(@NonNull TransitionInfo info) { for (int i = info.getChanges().size() - 1; i >= 0; --i) { final TransitionInfo.Change change = info.getChanges().get(i); if (change.getMode() == TRANSIT_CHANGE && change.hasFlags(FLAG_IS_DISPLAY)) { return true; } } return false; } /** * Sets up visibility/alpha/transforms to resemble the starting state of an animation. */ Loading