Fix boot timeout and reduce boot time
Since the notification shade has been separated from status bar to another window where the keyguard resides. It won't be visible until KeyguardViewMediator receives system ready. By making the visibility of notification shade consistent with the initial state of keyguard when attaching the window, window manager won't miss to wait for it. That avoids dismissing boot animation too early. The windows of notification shade and wallpaper can also be drawn earlier, that reduces the total waiting time of drawn windows by about 50~100ms on a mid-end device. The logic of wait-for-visible-not-drawn-window is restored to be the same as Q. The isVisible considers the independent visibility of wallpaper and visibility of the insets client. The isDrawnLw accepts READY_TO_SHOW so even keyguard decides not to use wallpaper, the procedure won't wait until timeout. Bug: 160271169 Bug: 158144185 Bug: 157746100 Bug: 157281833 Test: atest DisplayContentTests# \ testShouldWaitForSystemDecorWindowsOnBoot_OnDefaultDisplay NotificationShadeWindowControllerTest#attach_visibleWithWallpaper Test: Boot with enable/disable keyguard/wallpaper, there is no timeout and black screen or flickering. Change-Id: I2f979055e89ae5e40af05e469741bb89e2e24ce6 Merged-In: I2f979055e89ae5e40af05e469741bb89e2e24ce6
Loading
Please register or sign in to comment