OSDN Git Service

Request a wallpaper update when restoring surface of a wallpaper window
authorChong Zhang <chz@google.com>
Wed, 17 Aug 2016 17:19:05 +0000 (10:19 -0700)
committerChong Zhang <chz@google.com>
Wed, 17 Aug 2016 17:19:05 +0000 (10:19 -0700)
Normally wallpaper redo will be requested when the window draw finish.
If we're restoring, it's basically drawn instantly, and we need to update
so that the transition selection recognizes the correct wallpaper set up.

(Usually this scenario won't happen when going Home because home stack
don't save surface. However cts ActivityManagerTransitionSelectionTests
are simulating home with a task in fullscreen stack, and we might have
saved surfaces there.)

Change-Id: Ic5ba59ce54b279cc463888aefa94f7ddbf8a2bd3

services/core/java/com/android/server/wm/WindowState.java

index c83c083..746ae0f 100644 (file)
@@ -2272,6 +2272,8 @@ class WindowState extends WindowContainer implements WindowManagerPolicy.WindowS
             mWinAnimator.mDrawState = READY_TO_SHOW;
             mAnimatingWithSavedSurface = true;
 
+            requestUpdateWallpaperIfNeeded();
+
             if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
                 Slog.v(TAG, "Restoring saved surface: " + this);
             }