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

Report caption insets change when layout

This patch let DecorCaptionView report back to it's owner about height
change, instead of let the DecorView query the height. The previous
query points enableCaption() and updateDecorCaptionStatus() cannot
ensure the caption layout is finished and attached to the phone window.
Such that it may return a zero caption insets when it shouldn't be, if
the app do window configuration change handling by restarting.

The layout will ensure the caption insets get set when everything is
ready.

There will be no caption height change when resizing or moving, make
sure the calculated insets always include the caption regardless of the
frame position.

Bug: 154792488
Test: Manuel test with message and settings app.
Test: go/wm-smoke
Test: atest InsetsControllerTest#testCaptionInsetsStateAssemble
Test: atest InsetsSourceTest#testCalculateInsets_caption_resizing
Change-Id: I1728628eccb32b912210a64fe3a1c9cbe9e3b302
parent cf9ab7aa
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