From def6896d10ce4869831bf91eb73709e8a9714b27 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 24 Aug 2015 13:39:11 -0700 Subject: [PATCH] Fix shifted wallpaper after OTA Fixes a bug where WindowManager's and SurfaceFlinger's view of the wallpaper's position could get out of sync. Bug: 13020924 Change-Id: Iad17b0f516fffacd2877ceac40fcc8e2647c06b2 --- .../core/java/com/android/server/wm/WindowStateAnimator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index ab56d5e42ac52..726d29da533a2 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -1589,8 +1589,6 @@ class WindowStateAnimator { final int left = ((int) shownFrame.left) - attrs.surfaceInsets.left; final int top = ((int) shownFrame.top) - attrs.surfaceInsets.top; if (mSurfaceX != left || mSurfaceY != top) { - mSurfaceX = left; - mSurfaceY = top; if (mAnimating) { // If this window (or its app token) is animating, then the position // of the surface will be re-computed on the next animation frame. @@ -1598,6 +1596,8 @@ class WindowStateAnimator { // transformation is being applied by the animation. return; } + mSurfaceX = left; + mSurfaceY = top; if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION setWallpaperOffset"); SurfaceControl.openTransaction(); try {