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
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 @@
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,