am d6ac7c73: Merge change 22975 into eclair

Merge commit 'd6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5' into eclair-plus-aosp

* commit 'd6ac7c73e17f0ce0cc3b1290760c4f67cafcdec5':
  Fix issue #2069662: The wallpaper doesn't move along with the home screen
This commit is contained in:
Dianne Hackborn
2009-08-27 15:26:05 -07:00
committed by Android Git Automerger

View File

@@ -1217,7 +1217,8 @@ public class WindowManagerService extends IWindowManager.Stub
+ w.isReadyForDisplay() + " drawpending=" + w.mDrawPending + w.isReadyForDisplay() + " drawpending=" + w.mDrawPending
+ " commitdrawpending=" + w.mCommitDrawPending); + " commitdrawpending=" + w.mCommitDrawPending);
if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay() 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, if (DEBUG_WALLPAPER) Log.v(TAG,
"Found wallpaper activity: #" + i + "=" + w); "Found wallpaper activity: #" + i + "=" + w);
foundW = w; foundW = w;
@@ -6779,10 +6780,10 @@ public class WindowManagerService extends IWindowManager.Stub
} }
// This must be called while inside a transaction. // This must be called while inside a transaction.
void commitFinishDrawingLocked(long currentTime) { boolean commitFinishDrawingLocked(long currentTime) {
//Log.i(TAG, "commitFinishDrawingLocked: " + mSurface); //Log.i(TAG, "commitFinishDrawingLocked: " + mSurface);
if (!mCommitDrawPending) { if (!mCommitDrawPending) {
return; return false;
} }
mCommitDrawPending = false; mCommitDrawPending = false;
mReadyToShow = true; mReadyToShow = true;
@@ -6791,6 +6792,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (atoken == null || atoken.allDrawn || starting) { if (atoken == null || atoken.allDrawn || starting) {
performShowLocked(); performShowLocked();
} }
return true;
} }
// This must be called while inside a transaction. // This must be called while inside a transaction.
@@ -8639,6 +8641,7 @@ public class WindowManagerService extends IWindowManager.Stub
restart = false; restart = false;
boolean tokenMayBeDrawn = false; boolean tokenMayBeDrawn = false;
boolean wallpaperMayChange = false;
mPolicy.beginAnimationLw(dw, dh); mPolicy.beginAnimationLw(dw, dh);
@@ -8649,7 +8652,12 @@ public class WindowManagerService extends IWindowManager.Stub
if (w.mSurface != null) { if (w.mSurface != null) {
// Execute animation. // 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)) { if (w.stepAnimationLocked(currentTime, dw, dh)) {
animating = true; animating = true;
//w.dump(" "); //w.dump(" ");
@@ -8787,6 +8795,8 @@ public class WindowManagerService extends IWindowManager.Stub
mH.removeMessages(H.APP_TRANSITION_TIMEOUT); mH.removeMessages(H.APP_TRANSITION_TIMEOUT);
adjustWallpaperWindowsLocked(); adjustWallpaperWindowsLocked();
wallpaperMayChange = false;
if (DEBUG_APP_TRANSITIONS) Log.v(TAG, if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
"New wallpaper target=" + mWallpaperTarget "New wallpaper target=" + mWallpaperTarget
+ ", lower target=" + mLowerWallpaperTarget + ", lower target=" + mLowerWallpaperTarget
@@ -8885,6 +8895,13 @@ public class WindowManagerService extends IWindowManager.Stub
restart = true; restart = true;
} }
} }
if (wallpaperMayChange) {
if (adjustWallpaperWindowsLocked()) {
assignLayersLocked();
}
}
} while (restart); } while (restart);
// THIRD LOOP: Update the surfaces of all windows. // THIRD LOOP: Update the surfaces of all windows.