From 54a81c7cd14d2552c61daa2da3ebaf25c98ac506 Mon Sep 17 00:00:00 2001 From: Keun young Park Date: Mon, 15 Jun 2020 12:34:53 -0700 Subject: [PATCH] Reduce boot animation completion check interval - 200 ms interval can increase boot time by 200ms. - Reduce it to 50 ms for now. - TODO: Migrate to SystemServices.waitForState and remove polling completely Bug: 157281833 Bug: 159045990 Test: reboot and check boot time Change-Id: I2a7b7da90f1b14c16a7429ebd7f2971792f48e3c --- .../core/java/com/android/server/wm/WindowManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 10d07573f8c6b..4718b59f3bfe7 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -369,7 +369,8 @@ public class WindowManagerService extends IWindowManager.Stub static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 5000 * 1000000L; // Poll interval in milliseconds for watching boot animation finished. - private static final int BOOT_ANIMATION_POLL_INTERVAL = 200; + // TODO(b/159045990) Migrate to SystemService.waitForState with dedicated thread. + private static final int BOOT_ANIMATION_POLL_INTERVAL = 50; // The name of the boot animation service in init.rc. private static final String BOOT_ANIMATION_SERVICE = "bootanim";