summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/WindowManagerService.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-02-03 17:15:04 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-03 17:15:04 -0800
commit3d80ba05154a0b9700dd4d19aa0315dc3b95087f (patch)
tree242bf71d2ccb88b0a0a9cb73b4a6d111a42619a0 /services/java/com/android/server/WindowManagerService.java
parent2c7afbe15d71818fdeba4dad0c53299069939c78 (diff)
parentdd95421291f590ec0b1d8e79b73264516e1da027 (diff)
am dd954212: am a5861743: Merge "Fix issue #3418265: Rotation animation on wallpaper is broken" into honeycomb
* commit 'dd95421291f590ec0b1d8e79b73264516e1da027': Fix issue #3418265: Rotation animation on wallpaper is broken
Diffstat (limited to 'services/java/com/android/server/WindowManagerService.java')
-rw-r--r--services/java/com/android/server/WindowManagerService.java16
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 169c6d87d063..31866bca3270 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -7841,7 +7841,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());
}
@@ -7865,8 +7865,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);
@@ -9782,6 +9782,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();
@@ -9878,7 +9879,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mScreenRotationAnimation.stepAnimation(currentTime)) {
animating = true;
} else {
- mScreenRotationAnimation = null;
+ screenRotationFinished = true;
updateRotation = true;
}
}
@@ -11042,6 +11043,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(
@@ -11381,7 +11387,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 {