Correct the bound if it's from outside of screen

Use getBoundsOnScreen without clipToParent instead since the bounds
may be out of screen.

Bug: 149539748
Test: a11y CTS & unit tests
Change-Id: Ie2107f58a7cc5f0b76e4a468cfb295c410dbb559
This commit is contained in:
Jackal Guo
2020-02-20 14:01:11 +08:00
parent b909557790
commit 9a341abdb4

View File

@@ -1646,7 +1646,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
}
private void updateScreenMatrixForEmbeddedHierarchy() {
getBoundsOnScreen(mTmpRect, true);
getBoundsOnScreen(mTmpRect);
mTmpMatrix.reset();
mTmpMatrix.setTranslate(mTmpRect.left, mTmpRect.top);
mTmpMatrix.postScale(mScreenRect.width() / (float) mSurfaceWidth,