Make caption a insets source
This patch introduced setCaptionInsets, and set the Insets in ViewRootImpl when dispatch the insets if there's a caption. Modification is made in Window and DecorCaptionView to make caption overlay with the app content, and pass the value to ViewRootImpl to apply when dispatch. It is necessary to trigger a dispatch when caption enabled status chanaged, otherwise sometimes it will not be updated. Because caption is now updated locally on the client side. Some old logic to deal with the overlay caption without insets are removed, including the touch event dispatch override, the color override. Bug: 134531136 Test: go/wm-smoke Test: Manually change the value in dispatchApplyInsets, can observe a blank content area when there's a caption bar. Test: atest InsetsStateTest Test: atest InsetsControllerTest Change-Id: I356344a13c8569512d8f51f7ea19a5603f778252
Loading
Please register or sign in to comment