diff options
| -rw-r--r-- | core/java/android/view/RemoteAccessibilityController.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/SurfaceView.java | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/view/RemoteAccessibilityController.java b/core/java/android/view/RemoteAccessibilityController.java index 8855fb584ef3..28b567d94e6e 100644 --- a/core/java/android/view/RemoteAccessibilityController.java +++ b/core/java/android/view/RemoteAccessibilityController.java @@ -140,9 +140,9 @@ class RemoteAccessibilityController { return mConnectionWrapper; } - void setWindowMatrix(Matrix m) { - // If the window matrix is identity or doesn't change, do nothing. - if (m.isIdentity() || m.equals(mWindowMatrixForEmbeddedHierarchy)) { + void setWindowMatrix(Matrix m, boolean force) { + // If the window matrix doesn't change, do nothing. + if (!force && m.equals(mWindowMatrixForEmbeddedHierarchy)) { return; } diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 96b1abb62dbf..fd557e79c9c1 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -848,7 +848,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } applyTransactionOnVriDraw(surfaceUpdateTransaction); - updateEmbeddedAccessibilityMatrix(); + updateEmbeddedAccessibilityMatrix(false); mSurfaceFrame.left = 0; mSurfaceFrame.top = 0; @@ -1750,7 +1750,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall mRemoteAccessibilityController.assosciateHierarchy(connection, getViewRootImpl().mLeashToken, getAccessibilityViewId()); - updateEmbeddedAccessibilityMatrix(); + updateEmbeddedAccessibilityMatrix(true); } private void notifySurfaceDestroyed() { @@ -1778,7 +1778,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } - void updateEmbeddedAccessibilityMatrix() { + void updateEmbeddedAccessibilityMatrix(boolean force) { if (!mRemoteAccessibilityController.connected()) { return; } @@ -1792,7 +1792,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall mTmpMatrix.setTranslate(mTmpRect.left, mTmpRect.top); mTmpMatrix.postScale(mScreenRect.width() / (float) mSurfaceWidth, mScreenRect.height() / (float) mSurfaceHeight); - mRemoteAccessibilityController.setWindowMatrix(mTmpMatrix); + mRemoteAccessibilityController.setWindowMatrix(mTmpMatrix, force); } @Override |