diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-27 15:10:27 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-27 15:10:27 -0700 |
| commit | d6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5 (patch) | |
| tree | f33455300b85807f583ea6045f6cb9c9a6d613bf | |
| parent | 5352e237cad365f39c87aaeda3822c891c7ca474 (diff) | |
| parent | 6c3f571a1498f513dd53a67313a79bff877d3160 (diff) | |
| download | frameworks_base-d6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5.zip frameworks_base-d6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5.tar.gz frameworks_base-d6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5.tar.bz2 | |
Merge change 22975 into eclair
* changes:
Fix issue #2069662: The wallpaper doesn't move along with the home screen
| -rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 1384ede..4321b0d 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -1217,7 +1217,8 @@ public class WindowManagerService extends IWindowManager.Stub + w.isReadyForDisplay() + " drawpending=" + w.mDrawPending + " commitdrawpending=" + w.mCommitDrawPending); if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay() - && !w.mDrawPending && !w.mCommitDrawPending) { + && (mWallpaperTarget == w + || (!w.mDrawPending && !w.mCommitDrawPending))) { if (DEBUG_WALLPAPER) Log.v(TAG, "Found wallpaper activity: #" + i + "=" + w); foundW = w; @@ -6779,10 +6780,10 @@ public class WindowManagerService extends IWindowManager.Stub } // This must be called while inside a transaction. - void commitFinishDrawingLocked(long currentTime) { + boolean commitFinishDrawingLocked(long currentTime) { //Log.i(TAG, "commitFinishDrawingLocked: " + mSurface); if (!mCommitDrawPending) { - return; + return false; } mCommitDrawPending = false; mReadyToShow = true; @@ -6791,6 +6792,7 @@ public class WindowManagerService extends IWindowManager.Stub if (atoken == null || atoken.allDrawn || starting) { performShowLocked(); } + return true; } // This must be called while inside a transaction. @@ -8639,6 +8641,7 @@ public class WindowManagerService extends IWindowManager.Stub restart = false; boolean tokenMayBeDrawn = false; + boolean wallpaperMayChange = false; mPolicy.beginAnimationLw(dw, dh); @@ -8649,7 +8652,12 @@ public class WindowManagerService extends IWindowManager.Stub if (w.mSurface != null) { // Execute animation. - w.commitFinishDrawingLocked(currentTime); + if (w.commitFinishDrawingLocked(currentTime)) { + if ((w.mAttrs.flags + & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) { + wallpaperMayChange = true; + } + } if (w.stepAnimationLocked(currentTime, dw, dh)) { animating = true; //w.dump(" "); @@ -8787,6 +8795,8 @@ public class WindowManagerService extends IWindowManager.Stub mH.removeMessages(H.APP_TRANSITION_TIMEOUT); adjustWallpaperWindowsLocked(); + wallpaperMayChange = false; + if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "New wallpaper target=" + mWallpaperTarget + ", lower target=" + mLowerWallpaperTarget @@ -8885,6 +8895,13 @@ public class WindowManagerService extends IWindowManager.Stub restart = true; } } + + if (wallpaperMayChange) { + if (adjustWallpaperWindowsLocked()) { + assignLayersLocked(); + } + } + } while (restart); // THIRD LOOP: Update the surfaces of all windows. |
