Handle reperenting of InlineContentView
When an inline content view is reparented its surface is getting offset and not being under the view itelf. This is because the surface views manage the postion of their surface and are assuming a location based off the window's surface position. However after a reparenting the inline content view's surface position becomes relative to that of the new parent surface view. For example, two surface views at position (10, 10) being reparented would reslut in the surface of the parent being at (10, 10) while the surface of the child being at (20, 20) while both views would still be at (10, 10). To address this we are intecepting when an inline content view's surface is reparented and get a weak reference to the view that owns the new parent surface. We then position the inline content view's surface relative to the view that owns the new parent surface, i.e. we position the surface such that its location would not change because of the fact it is being reparented. While at this make sure the inline content view is marked as not important for a11y to ernsure the a11y plugins don't try to click on the view tree in the app's process but insted on the views in the remote proccess, i.e. on the embedded view tree. bug:153826463 Test: atest android.widget.cts.inline.InlineContentViewTest#testReparenting Change-Id: I2cff4b88d404a740bc447668e948eabccad084d2
Loading
Please register or sign in to comment