Skip to content
Commit b509f92e authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Do not set insets changed for invisible window

The visible-requested state of non-activity/wallpaper window is
usually true because it doesn't consider token visibility and the
policy visibility isn't hidden.

Since insets change will also trigger reportResized if
WindowFrames#hasInsetsChanged() returns true, the visible-requested
state should be only used if the token of window implements
isVisibleRequested(). Otherwise all invisible window will receive
resize and report drawn for configuration change, such as display
rotation.

Fix: 236235776
Test: atest WindowStateTests#testSetFreezeInsetsState
Test: adb shell wm logging enable-text WM_DEBUG_RESIZE
      Rotate screen, there is no log "Reporting new frame to"
      for invisible windows.
Change-Id: Ibe34fa94e7cee7f9db460b0a205a87d0efe6a0f9
parent 12e59904
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