summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-11-29 17:51:24 -0800
committerDianne Hackborn <hackbod@google.com>2012-11-29 17:51:24 -0800
commit4b16969b006613bff4901a6e979f29a0f501430b (patch)
treece39b5a558172c3fa54416bad61178ec4b350c0b /services
parent860d0cd452529e7a01152582e6535c2129a46af7 (diff)
downloadframeworks_base-4b16969b006613bff4901a6e979f29a0f501430b.zip
frameworks_base-4b16969b006613bff4901a6e979f29a0f501430b.tar.gz
frameworks_base-4b16969b006613bff4901a6e979f29a0f501430b.tar.bz2
Don't apply transformation fudge when not rotating.
There is this stupid fudge factor applied to window transformations when doing a screen rotation animation. We need this when rotating, but when not rotating it causes very visible artifacts. Historically the non-rotation case only happened due to configuration changes, so wasn't that big a deal. Now however that we use this when switching users, it is more annoying. So get rid of it for such cases. Change-Id: I6b343866c1bad9b16984b4a629917c2f1bb37b9e
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/ScreenRotationAnimation.java4
-rw-r--r--services/java/com/android/server/wm/WindowStateAnimator.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java
index 8d2e2e8..cfcf841 100644
--- a/services/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -668,6 +668,10 @@ class ScreenRotationAnimation {
return hasAnimations() || (TWO_PHASE_ANIMATION && mFinishAnimReady);
}
+ public boolean isRotating() {
+ return mCurRotation != mOriginalRotation;
+ }
+
private boolean hasAnimations() {
return (TWO_PHASE_ANIMATION &&
(mStartEnterAnimation != null || mStartExitAnimation != null
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index e33b7b7..d7fcc67 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -876,7 +876,7 @@ class WindowStateAnimator {
final Matrix tmpMatrix = mWin.mTmpMatrix;
// Compute the desired transformation.
- if (screenAnimation) {
+ if (screenAnimation && screenRotationAnimation.isRotating()) {
// If we are doing a screen animation, the global rotation
// applied to windows can result in windows that are carefully
// aligned with each other to slightly separate, allowing you