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

Do not set orientation changing just for screen off

The case happens when screen is off and insetsChanged is true
when checking updateResizingWindowIfNeeded for wallpaper window.
Then its draw state is set to DRAW_PENDING. But wallpaper won't
report draw because its view visibility is always visible and
unnecessary to perform relayout for server side visibility change.
Then it stuck in DRAW_PENDING state so the surface doesn't show.

The orientation changing should be restricted to only take effect
for real orientation change, instead of a indirect redraw request.
The common way to wait windows to be drawn for screen on should be
waitForAllWindowsDrawn.

Fixes: 236534213
Test: WindowStateTests#testRequestDrawIfNeeded
Test: Launch a show-when-locked activity, enter lock screen
      and swipe up/down from bottom. Turn off/on screen.
      Unlock to home and see if wallpaper is visible.
Change-Id: I468aa0d1cb2e946b780e09e05aa8746174335685
parent c6489d3c
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