diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-02-02 17:12:25 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-02-02 18:32:27 -0800 |
commit | 50660e27283e33da7fb226f454cf704d1e0a5bb8 (patch) | |
tree | d53fd9608740fddb3a5eed2e525439a069320724 /services/java/com/android/server/WindowManagerService.java | |
parent | f44ed5adc42fefa0c91fc79c5e3c20e1cdc7d697 (diff) |
Fix issue #3418265: Rotation animation on wallpaper is broken
Two problems:
1. The wallpaper offsets were being applied at the wrong place in the xform.
2. The background black needs become a clip around the newly revealed UI.
Change-Id: I3b46aea2ace3c8c5a36fc5e37b4e2b67fff1b289
Diffstat (limited to 'services/java/com/android/server/WindowManagerService.java')
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index e1c03d4fe667..a98c3e36d48a 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -7842,7 +7842,7 @@ public class WindowManagerService extends IWindowManager.Stub if (selfTransformation) { tmpMatrix.postConcat(mTransformation.getMatrix()); } - tmpMatrix.postTranslate(frame.left, frame.top); + tmpMatrix.postTranslate(frame.left + mXOffset, frame.top + mYOffset); if (attachedTransformation != null) { tmpMatrix.postConcat(attachedTransformation.getMatrix()); } @@ -7866,8 +7866,8 @@ public class WindowManagerService extends IWindowManager.Stub mDtDx = tmpFloats[Matrix.MSKEW_Y]; mDsDy = tmpFloats[Matrix.MSKEW_X]; mDtDy = tmpFloats[Matrix.MSCALE_Y]; - int x = (int)tmpFloats[Matrix.MTRANS_X] + mXOffset; - int y = (int)tmpFloats[Matrix.MTRANS_Y] + mYOffset; + int x = (int)tmpFloats[Matrix.MTRANS_X]; + int y = (int)tmpFloats[Matrix.MTRANS_Y]; int w = frame.width(); int h = frame.height(); mShownFrame.set(x, y, x+w, y+h); @@ -9783,6 +9783,7 @@ public class WindowManagerService extends IWindowManager.Stub boolean animating = false; boolean createWatermark = false; boolean updateRotation = false; + boolean screenRotationFinished = false; if (mFxSession == null) { mFxSession = new SurfaceSession(); @@ -9879,7 +9880,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mScreenRotationAnimation.stepAnimation(currentTime)) { animating = true; } else { - mScreenRotationAnimation = null; + screenRotationFinished = true; updateRotation = true; } } @@ -11043,6 +11044,11 @@ public class WindowManagerService extends IWindowManager.Stub mTurnOnScreen = false; } + if (screenRotationFinished && mScreenRotationAnimation != null) { + mScreenRotationAnimation.kill(); + mScreenRotationAnimation = null; + } + if (updateRotation) { if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-rotate rotation"); boolean changed = setRotationUncheckedLocked( @@ -11382,7 +11388,7 @@ public class WindowManagerService extends IWindowManager.Stub if (CUSTOM_SCREEN_ROTATION) { if (mScreenRotationAnimation != null) { - if (mScreenRotationAnimation.dismiss(MAX_ANIMATION_DURATION, + if (mScreenRotationAnimation.dismiss(mFxSession, MAX_ANIMATION_DURATION, mTransitionAnimationScale)) { requestAnimationLocked(0); } else { |