summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-09-11 17:42:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-11 17:42:44 +0000
commit2f67e237383ae6e76c44333ab79c6f0d1e3e568d (patch)
treee943d465581ceaf6913f6d8f93c47f295c319cf3
parente14a29ff3d8d4625415ac39e7f4c9b464f363b9f (diff)
parentb180d7707ffc2671caf494f2110b8942cedb5521 (diff)
downloadframeworks_base-2f67e237383ae6e76c44333ab79c6f0d1e3e568d.zip
frameworks_base-2f67e237383ae6e76c44333ab79c6f0d1e3e568d.tar.gz
frameworks_base-2f67e237383ae6e76c44333ab79c6f0d1e3e568d.tar.bz2
Merge "Windows for accessibility with wrong coords on rotation." into lmp-dev
-rw-r--r--services/core/java/com/android/server/wm/WindowAnimator.java9
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java7
2 files changed, 14 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 81cd602..50e417b 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -568,6 +568,15 @@ public class WindowAnimator {
mBulkUpdateParams |= SET_UPDATE_ROTATION;
screenRotationAnimation.kill();
displayAnimator.mScreenRotationAnimation = null;
+
+ //TODO (multidisplay): Accessibility supported only for the default display.
+ if (mService.mAccessibilityController != null
+ && displayId == Display.DEFAULT_DISPLAY) {
+ // We just finished rotation animation which means we did not
+ // anounce the rotation and waited for it to end, announce now.
+ mService.mAccessibilityController.onRotationChangedLocked(
+ mService.getDefaultDisplayContentLocked(), mService.mRotation);
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 54af851..b7e56cb 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -6442,9 +6442,12 @@ public class WindowManagerService extends IWindowManager.Stub
}
//TODO (multidisplay): Magnification is supported only for the default display.
- if (mAccessibilityController != null
+ // Announce rotation only if we will not animate as we already have the
+ // windows in final state. Otherwise, we make this call at the rotation end.
+ if (screenRotationAnimation == null && mAccessibilityController != null
&& displayContent.getDisplayId() == Display.DEFAULT_DISPLAY) {
- mAccessibilityController.onRotationChangedLocked(getDefaultDisplayContentLocked(), rotation);
+ mAccessibilityController.onRotationChangedLocked(getDefaultDisplayContentLocked(),
+ rotation);
}
return true;