Loading core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,16 @@ flag { } } flag { name: "ensure_wallpaper_in_wear_transitions" namespace: "windowing_frontend" description: "Ensure that wallpaper window tokens are always present/available for collection in transitions on Wear" bug: "355596979" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "custom_animations_behind_translucent" namespace: "windowing_frontend" Loading services/core/java/com/android/server/wm/Transition.java +4 −3 Original line number Diff line number Diff line Loading @@ -1804,7 +1804,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // If on a rotation leash, the wallpaper token surface needs to be shown explicitly // because shell only gets the leash and the wallpaper token surface is not allowed // to be changed by non-transition logic until the transition is finished. if (Flags.ensureWallpaperInTransitions() && wp.isVisibleRequested() if (wp.mWmService.mFlags.mEnsureWallpaperInTransitions && wp.isVisibleRequested() && wp.getFixedRotationLeash() != null) { transaction.show(wp.mSurfaceControl); } Loading Loading @@ -2216,7 +2216,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { if (wallpaper != null) { if (!wallpaper.isVisible() && wallpaper.isVisibleRequested()) { wallpaper.commitVisibility(showWallpaper); } else if (Flags.ensureWallpaperInTransitions() && wallpaper.isVisible() } else if (wallpaper.mWmService.mFlags.mEnsureWallpaperInTransitions && wallpaper.isVisible() && !showWallpaper && !wallpaper.getDisplayContent().isKeyguardLocked() && !wallpaperIsOwnTarget(wallpaper)) { wallpaper.setVisibleRequested(false); Loading Loading @@ -2934,7 +2935,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // Use parent rotation because shell doesn't know the surface is rotated. endRotation = parent.getWindowConfiguration().getRotation(); } } else if (isWallpaper(target) && Flags.ensureWallpaperInTransitions() } else if (isWallpaper(target) && target.mWmService.mFlags.mEnsureWallpaperInTransitions && target.getRelativeDisplayRotation() != 0 && !target.mTransitionController.useShellTransitionsRotation()) { // If the wallpaper is "fixed-rotated", shell is unaware of this, so use the Loading services/core/java/com/android/server/wm/WallpaperController.java +2 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.ProtoLog; import com.android.internal.util.ToBooleanFunction; import com.android.server.wallpaper.WallpaperCropper.WallpaperCropUtils; import com.android.window.flags.Flags; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -759,7 +758,7 @@ class WallpaperController { void collectTopWallpapers(Transition transition) { if (mFindResults.hasTopShowWhenLockedWallpaper()) { if (Flags.ensureWallpaperInTransitions()) { if (mService.mFlags.mEnsureWallpaperInTransitions) { transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper.mToken); } else { transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper); Loading @@ -767,7 +766,7 @@ class WallpaperController { } if (mFindResults.hasTopHideWhenLockedWallpaper()) { if (Flags.ensureWallpaperInTransitions()) { if (mService.mFlags.mEnsureWallpaperInTransitions) { transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper.mToken); } else { transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper); Loading services/core/java/com/android/server/wm/WallpaperWindowToken.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.os.RemoteException; import android.util.SparseArray; import com.android.internal.protolog.ProtoLog; import com.android.window.flags.Flags; import java.util.function.Consumer; Loading Loading @@ -85,7 +84,7 @@ class WallpaperWindowToken extends WindowToken { public void prepareSurfaces() { super.prepareSurfaces(); if (Flags.ensureWallpaperInTransitions()) { if (mWmService.mFlags.mEnsureWallpaperInTransitions) { // Similar to Task.prepareSurfaces, outside of transitions we need to apply visibility // changes directly. In transitions the transition player will take care of applying the // visibility change. Loading services/core/java/com/android/server/wm/WindowManagerFlags.java +24 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.server.wm; import android.app.AppGlobals; import android.content.pm.PackageManager; import com.android.window.flags.Flags; /** Loading Loading @@ -53,5 +56,26 @@ class WindowManagerFlags { final boolean mRespectNonTopVisibleFixedOrientation = Flags.respectNonTopVisibleFixedOrientation(); final boolean mEnsureWallpaperInTransitions; /* End Available Flags */ WindowManagerFlags() { boolean isWatch; try { isWatch = AppGlobals.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WATCH, 0 /* version */); } catch (Throwable e) { isWatch = false; } /* * Wallpaper enablement is separated on Wear vs Phone as the latter appears to still exhibit * regressions when enabled (for example b/353870983). These don't exist on Wear likely * due to differences in SysUI/transition implementations. Wear enablement is required for * 25Q2 while phone doesn't have as pressing a constraint and will wait to resolve any * outstanding issues prior to roll-out. */ mEnsureWallpaperInTransitions = (isWatch && Flags.ensureWallpaperInWearTransitions()) || Flags.ensureWallpaperInTransitions(); } } Loading
core/java/android/window/flags/windowing_frontend.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,16 @@ flag { } } flag { name: "ensure_wallpaper_in_wear_transitions" namespace: "windowing_frontend" description: "Ensure that wallpaper window tokens are always present/available for collection in transitions on Wear" bug: "355596979" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "custom_animations_behind_translucent" namespace: "windowing_frontend" Loading
services/core/java/com/android/server/wm/Transition.java +4 −3 Original line number Diff line number Diff line Loading @@ -1804,7 +1804,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // If on a rotation leash, the wallpaper token surface needs to be shown explicitly // because shell only gets the leash and the wallpaper token surface is not allowed // to be changed by non-transition logic until the transition is finished. if (Flags.ensureWallpaperInTransitions() && wp.isVisibleRequested() if (wp.mWmService.mFlags.mEnsureWallpaperInTransitions && wp.isVisibleRequested() && wp.getFixedRotationLeash() != null) { transaction.show(wp.mSurfaceControl); } Loading Loading @@ -2216,7 +2216,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { if (wallpaper != null) { if (!wallpaper.isVisible() && wallpaper.isVisibleRequested()) { wallpaper.commitVisibility(showWallpaper); } else if (Flags.ensureWallpaperInTransitions() && wallpaper.isVisible() } else if (wallpaper.mWmService.mFlags.mEnsureWallpaperInTransitions && wallpaper.isVisible() && !showWallpaper && !wallpaper.getDisplayContent().isKeyguardLocked() && !wallpaperIsOwnTarget(wallpaper)) { wallpaper.setVisibleRequested(false); Loading Loading @@ -2934,7 +2935,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // Use parent rotation because shell doesn't know the surface is rotated. endRotation = parent.getWindowConfiguration().getRotation(); } } else if (isWallpaper(target) && Flags.ensureWallpaperInTransitions() } else if (isWallpaper(target) && target.mWmService.mFlags.mEnsureWallpaperInTransitions && target.getRelativeDisplayRotation() != 0 && !target.mTransitionController.useShellTransitionsRotation()) { // If the wallpaper is "fixed-rotated", shell is unaware of this, so use the Loading
services/core/java/com/android/server/wm/WallpaperController.java +2 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.ProtoLog; import com.android.internal.util.ToBooleanFunction; import com.android.server.wallpaper.WallpaperCropper.WallpaperCropUtils; import com.android.window.flags.Flags; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -759,7 +758,7 @@ class WallpaperController { void collectTopWallpapers(Transition transition) { if (mFindResults.hasTopShowWhenLockedWallpaper()) { if (Flags.ensureWallpaperInTransitions()) { if (mService.mFlags.mEnsureWallpaperInTransitions) { transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper.mToken); } else { transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper); Loading @@ -767,7 +766,7 @@ class WallpaperController { } if (mFindResults.hasTopHideWhenLockedWallpaper()) { if (Flags.ensureWallpaperInTransitions()) { if (mService.mFlags.mEnsureWallpaperInTransitions) { transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper.mToken); } else { transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper); Loading
services/core/java/com/android/server/wm/WallpaperWindowToken.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.os.RemoteException; import android.util.SparseArray; import com.android.internal.protolog.ProtoLog; import com.android.window.flags.Flags; import java.util.function.Consumer; Loading Loading @@ -85,7 +84,7 @@ class WallpaperWindowToken extends WindowToken { public void prepareSurfaces() { super.prepareSurfaces(); if (Flags.ensureWallpaperInTransitions()) { if (mWmService.mFlags.mEnsureWallpaperInTransitions) { // Similar to Task.prepareSurfaces, outside of transitions we need to apply visibility // changes directly. In transitions the transition player will take care of applying the // visibility change. Loading
services/core/java/com/android/server/wm/WindowManagerFlags.java +24 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.server.wm; import android.app.AppGlobals; import android.content.pm.PackageManager; import com.android.window.flags.Flags; /** Loading Loading @@ -53,5 +56,26 @@ class WindowManagerFlags { final boolean mRespectNonTopVisibleFixedOrientation = Flags.respectNonTopVisibleFixedOrientation(); final boolean mEnsureWallpaperInTransitions; /* End Available Flags */ WindowManagerFlags() { boolean isWatch; try { isWatch = AppGlobals.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WATCH, 0 /* version */); } catch (Throwable e) { isWatch = false; } /* * Wallpaper enablement is separated on Wear vs Phone as the latter appears to still exhibit * regressions when enabled (for example b/353870983). These don't exist on Wear likely * due to differences in SysUI/transition implementations. Wear enablement is required for * 25Q2 while phone doesn't have as pressing a constraint and will wait to resolve any * outstanding issues prior to roll-out. */ mEnsureWallpaperInTransitions = (isWatch && Flags.ensureWallpaperInWearTransitions()) || Flags.ensureWallpaperInTransitions(); } }