summaryrefslogtreecommitdiff
path: root/packages/CarSystemUI/src
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-07-03 21:46:24 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-07-06 22:11:46 +0800
commit29bfa72754bda094435f403d39db276fff2c4edd (patch)
treea7f194d66e8a5efebcb9a10ea4ac3735afa16d8e /packages/CarSystemUI/src
parente5e4c105c2f8b7fb2f58ac0f6c85730d3c710842 (diff)
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
Diffstat (limited to 'packages/CarSystemUI/src')
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java
index a4230032858e..13f2b7ed45db 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java
@@ -23,6 +23,7 @@ import android.view.WindowManager;
import com.android.systemui.car.window.SystemUIOverlayWindowController;
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.dump.DumpManager;
+import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.DozeParameters;
@@ -49,12 +50,14 @@ public class DummyNotificationShadeWindowController extends NotificationShadeWin
DozeParameters dozeParameters,
StatusBarStateController statusBarStateController,
ConfigurationController configurationController,
+ KeyguardViewMediator keyguardViewMediator,
KeyguardBypassController keyguardBypassController,
SysuiColorExtractor colorExtractor,
DumpManager dumpManager,
SystemUIOverlayWindowController overlayWindowController) {
super(context, windowManager, activityManager, dozeParameters, statusBarStateController,
- configurationController, keyguardBypassController, colorExtractor, dumpManager);
+ configurationController, keyguardViewMediator, keyguardBypassController,
+ colorExtractor, dumpManager);
mOverlayWindowController = overlayWindowController;
}