Loading services/core/java/com/android/server/wm/WallpaperWindowToken.java +5 −5 Original line number Diff line number Diff line Loading @@ -193,11 +193,11 @@ class WallpaperWindowToken extends WindowToken { if (mVisibleRequested != visible) { // Before setting mVisibleRequested so we can track changes. final WindowState wpTarget = mDisplayContent.mWallpaperController.getWallpaperTarget(); final boolean isTargetNotCollectedActivity = wpTarget != null && wpTarget.mActivityRecord != null && !mTransitionController.isCollecting(wpTarget.mActivityRecord); // Skip collecting requesting-invisible wallpaper if the wallpaper target is an activity // and it is not collected. Because the visibility change may be called after the final boolean isTargetNotCollectedActivity = wpTarget == null || (wpTarget.mActivityRecord != null && !mTransitionController.isCollecting(wpTarget.mActivityRecord)); // Skip collecting requesting-invisible wallpaper if the wallpaper target is empty or // a non-collected activity. Because the visibility change may be called after the // transition of activity is finished, e.g. WallpaperController#hideWallpapers from // hiding surface of the target. Then if there is a next transition, the wallpaper // change may be collected into the unrelated transition and cause a weird animation. Loading services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -410,6 +410,8 @@ public class WallpaperControllerTests extends WindowTestsBase { final WindowState wallpaperWindow = createWallpaperWindow(dc); final WallpaperWindowToken token = wallpaperWindow.mToken.asWallpaperToken(); wallpaperWindow.setHasSurface(true); spyOn(dc.mWallpaperController); doReturn(wallpaperWindow).when(dc.mWallpaperController).getWallpaperTarget(); // Set-up mock shell transitions registerTestTransitionPlayer(); Loading Loading
services/core/java/com/android/server/wm/WallpaperWindowToken.java +5 −5 Original line number Diff line number Diff line Loading @@ -193,11 +193,11 @@ class WallpaperWindowToken extends WindowToken { if (mVisibleRequested != visible) { // Before setting mVisibleRequested so we can track changes. final WindowState wpTarget = mDisplayContent.mWallpaperController.getWallpaperTarget(); final boolean isTargetNotCollectedActivity = wpTarget != null && wpTarget.mActivityRecord != null && !mTransitionController.isCollecting(wpTarget.mActivityRecord); // Skip collecting requesting-invisible wallpaper if the wallpaper target is an activity // and it is not collected. Because the visibility change may be called after the final boolean isTargetNotCollectedActivity = wpTarget == null || (wpTarget.mActivityRecord != null && !mTransitionController.isCollecting(wpTarget.mActivityRecord)); // Skip collecting requesting-invisible wallpaper if the wallpaper target is empty or // a non-collected activity. Because the visibility change may be called after the // transition of activity is finished, e.g. WallpaperController#hideWallpapers from // hiding surface of the target. Then if there is a next transition, the wallpaper // change may be collected into the unrelated transition and cause a weird animation. Loading
services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -410,6 +410,8 @@ public class WallpaperControllerTests extends WindowTestsBase { final WindowState wallpaperWindow = createWallpaperWindow(dc); final WallpaperWindowToken token = wallpaperWindow.mToken.asWallpaperToken(); wallpaperWindow.setHasSurface(true); spyOn(dc.mWallpaperController); doReturn(wallpaperWindow).when(dc.mWallpaperController).getWallpaperTarget(); // Set-up mock shell transitions registerTestTransitionPlayer(); Loading