Fix requestUnbufferedDispatch didn't work before window attached

Before window attached to view, the parent of root view would be null
cause the unbuffered request can't be updated to the `ViewRootImpl`.

This will update the unbuffered request when the root view set to its
`ViewRootImpl`, so we could make sure the unbuffered request could be
consistent in root view and its ViewRootImpl.

Bug: 268105812
Test: manual
Change-Id: Ifd9cf0969229daeac73f8fb95c6a9fe8c81a985f
This commit is contained in:
Arthur Hung
2023-02-07 01:48:13 +00:00
parent a3f6566acc
commit b2a805df9f

View File

@@ -1391,6 +1391,8 @@ public final class ViewRootImpl implements ViewParent,
listener, listener.data, mHandler, true /*waitForPresentTime*/);
mAttachInfo.mThreadedRenderer.addObserver(mHardwareRendererObserver);
}
// Update unbuffered request when set the root view.
mUnbufferedInputSource = mView.mUnbufferedInputSource;
}
view.assignParent(this);