Skip to content
Commit 57283fb6 authored by Lais Andrade's avatar Lais Andrade
Browse files

Wait for windows to be drawn before ending boot animation

The WindowManagerService relies on
DisplayContent#shouldWaitForSystemDecorWindowsOnBoot to decide when to
stop the boot animation. This is using WindowState#isDrawnLw, which
retuns true even if the window animation drawn state is still
READY_TO_SHOW, which causes the animation to finish before the windows
have actually drawn its content.

Adding an extra contion of the WindowState#hasDrawn fixes the bug by
forcing the boot animation to wait for the actual drawning.

The black screen blinking after boot was probably introduced after
ag/5312659 fixed a boot timeout that happened because #isVisibleLw was
also being called as a wait condition. Fixing the timeout surfaced the
fact that isDrawnLw is not enough condition to wait for the windows to
be drawn.

Fix: 149050316
Test: atest DisplayContentTests and also manually restarting device
Change-Id: I4a24e61d61a10d898d37022549d6aa531c251df3
parent e66ac51e
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