Skip to content
Commit fae0aeab authored by Yunfan Chen's avatar Yunfan Chen
Browse files

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
parent 6f3e64a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment