Loading core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -461,6 +461,16 @@ flag { } } flag { name: "polish_close_wallpaper_includes_open_change" namespace: "windowing_frontend" description: "Record the initial z-order while collecting window containers, keep the wallpaper always at the bottom, and use a cross-fade animation when a close wallpaper transition includes an open target." bug: "421436197" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "predictive_back_callback_cancellation_fix" namespace: "windowing_frontend" Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_TRANSLUCENT; import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITION_CLOSE; Loading @@ -46,6 +47,7 @@ import android.view.InsetsSource; import android.view.InsetsState; import android.view.SurfaceControl; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.window.TransitionInfo; Loading Loading @@ -163,6 +165,19 @@ public class TransitionAnimationHelper { } Animation a = null; if (com.android.window.flags.Flags.polishCloseWallpaperIncludesOpenChange()) { if (animAttr == R.styleable.WindowAnimation_wallpaperCloseExitAnimation) { // A closing wallpaper doesn't need an animation. if (change.hasFlags(FLAG_IS_WALLPAPER)) { animAttr = 0; } else { // TODO (b/421436197): Modify wallpaper_close_exit.xml when clean up the flag. a = new AlphaAnimation(1.0f /* fromAlpha */, 0.0f /* toAlpha */); a.setDuration(275 /* durationMillis */); return a; } } } if (animAttr != 0) { if (overrideType == ANIM_FROM_STYLE && !isTask) { final TransitionInfo.AnimationOptions.CustomActivityTransition customTransition = Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +2 −1 Original line number Diff line number Diff line Loading @@ -618,7 +618,8 @@ public class Transitions implements RemoteCallable<Transitions>, return zSplitLine + numChanges - i; } } else if (mode == TRANSIT_CLOSE || mode == TRANSIT_TO_BACK) { if (isOpening) { if (isOpening || (change.hasFlags(FLAG_IS_WALLPAPER) && com.android.window.flags.Flags.polishCloseWallpaperIncludesOpenChange())) { // put on bottom and leave visible return zSplitLine - i; } else { Loading services/core/java/com/android/server/wm/ActivityRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -3571,7 +3571,8 @@ final class ActivityRecord extends WindowToken { } final Task rootTask = getRootTask(); final boolean mayAdjustTop = (isState(RESUMED) || rootTask.getTopResumedActivity() == null) final boolean mayAdjustTop = !Flags.polishCloseWallpaperIncludesOpenChange() && (isState(RESUMED) || rootTask.getTopResumedActivity() == null) && rootTask.isFocusedRootTaskOnDisplay() // Do not adjust focus task because the task will be reused to launch new activity. && !task.isClearingToReuseTask(); Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -461,6 +461,16 @@ flag { } } flag { name: "polish_close_wallpaper_includes_open_change" namespace: "windowing_frontend" description: "Record the initial z-order while collecting window containers, keep the wallpaper always at the bottom, and use a cross-fade animation when a close wallpaper transition includes an open target." bug: "421436197" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "predictive_back_callback_cancellation_fix" namespace: "windowing_frontend" Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_TRANSLUCENT; import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITION_CLOSE; Loading @@ -46,6 +47,7 @@ import android.view.InsetsSource; import android.view.InsetsState; import android.view.SurfaceControl; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.window.TransitionInfo; Loading Loading @@ -163,6 +165,19 @@ public class TransitionAnimationHelper { } Animation a = null; if (com.android.window.flags.Flags.polishCloseWallpaperIncludesOpenChange()) { if (animAttr == R.styleable.WindowAnimation_wallpaperCloseExitAnimation) { // A closing wallpaper doesn't need an animation. if (change.hasFlags(FLAG_IS_WALLPAPER)) { animAttr = 0; } else { // TODO (b/421436197): Modify wallpaper_close_exit.xml when clean up the flag. a = new AlphaAnimation(1.0f /* fromAlpha */, 0.0f /* toAlpha */); a.setDuration(275 /* durationMillis */); return a; } } } if (animAttr != 0) { if (overrideType == ANIM_FROM_STYLE && !isTask) { final TransitionInfo.AnimationOptions.CustomActivityTransition customTransition = Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +2 −1 Original line number Diff line number Diff line Loading @@ -618,7 +618,8 @@ public class Transitions implements RemoteCallable<Transitions>, return zSplitLine + numChanges - i; } } else if (mode == TRANSIT_CLOSE || mode == TRANSIT_TO_BACK) { if (isOpening) { if (isOpening || (change.hasFlags(FLAG_IS_WALLPAPER) && com.android.window.flags.Flags.polishCloseWallpaperIncludesOpenChange())) { // put on bottom and leave visible return zSplitLine - i; } else { Loading
services/core/java/com/android/server/wm/ActivityRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -3571,7 +3571,8 @@ final class ActivityRecord extends WindowToken { } final Task rootTask = getRootTask(); final boolean mayAdjustTop = (isState(RESUMED) || rootTask.getTopResumedActivity() == null) final boolean mayAdjustTop = !Flags.polishCloseWallpaperIncludesOpenChange() && (isState(RESUMED) || rootTask.getTopResumedActivity() == null) && rootTask.isFocusedRootTaskOnDisplay() // Do not adjust focus task because the task will be reused to launch new activity. && !task.isClearingToReuseTask(); Loading