From 191713a51f0292b7fce72cc7e16cfd0f0204a0c7 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Thu, 12 Jan 2012 12:02:22 -0800 Subject: Move where prop dev.bootcomplete is set Currently test harnesses depends on this flag to determine when the system is fully booted, and start dismissing keyguard, launch tests etc. However, the flag is usually set when the boot animation is still running, and typically about 5 seconds before keyguard is up etc. Moving to to when BOOT_COMPLETE broadcast is sent makes it work more reliable. We also discussed about using sys.boot_completed instead, unfortunately this flag is not in all platform and we still have backwards compatibility to maintain in order to drive unbundled tests. Change-Id: I99b084cd70d8e4bcfe490ddeca868136d32712e2 --- policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 1 - services/java/com/android/server/am/ActivityManagerService.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 468f0d5..3e94ebb 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -3456,7 +3456,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void systemReady() { // tell the keyguard mKeyguardMediator.onSystemReady(); - android.os.SystemProperties.set("dev.bootcomplete", "1"); synchronized (mLock) { updateOrientationListenerLp(); mSystemReady = true; diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index bbb4917..db0a736 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -4045,6 +4045,7 @@ public final class ActivityManagerService extends ActivityManagerNative mHandler.sendMessageDelayed(nmsg, POWER_CHECK_DELAY); // Tell anyone interested that we are done booting! SystemProperties.set("sys.boot_completed", "1"); + SystemProperties.set("dev.bootcomplete", "1"); broadcastIntentLocked(null, null, new Intent(Intent.ACTION_BOOT_COMPLETED, null), null, null, 0, null, null, -- cgit v1.1