diff options
3 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/SystemServerInitThreadPool.java b/services/core/java/com/android/server/SystemServerInitThreadPool.java index 94d6b135e554..c0611374679b 100644 --- a/services/core/java/com/android/server/SystemServerInitThreadPool.java +++ b/services/core/java/com/android/server/SystemServerInitThreadPool.java @@ -133,9 +133,11 @@ public class SystemServerInitThreadPool { /** * Shuts it down. * - * <p>Note:</p> should only be called by {@link SystemServer}. + * <p>Note:</p> should only be called *after* {@code PHASE_BOOT_COMPLETED} is sent to the + * {@link SystemService system services}. */ static void shutdown() { + Slog.d(TAG, "Shutdown requested"); synchronized (LOCK) { TimingsTraceAndSlog t = new TimingsTraceAndSlog(); t.traceBegin("WaitInitThreadPoolShutdown"); diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java index d2e12b52ba35..197a2cef0a62 100644 --- a/services/core/java/com/android/server/SystemServiceManager.java +++ b/services/core/java/com/android/server/SystemServiceManager.java @@ -222,6 +222,7 @@ public class SystemServiceManager { if (phase == SystemService.PHASE_BOOT_COMPLETED) { final long totalBootTime = SystemClock.uptimeMillis() - mRuntimeStartUptime; t.logDuration("TotalBootTime", totalBootTime); + SystemServerInitThreadPool.shutdown(); } } diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 9daa018df284..ab84c3653f5f 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -584,7 +584,6 @@ public final class SystemServer { startBootstrapServices(t); startCoreServices(t); startOtherServices(t); - SystemServerInitThreadPool.shutdown(); } catch (Throwable ex) { Slog.e("System", "******************************************"); Slog.e("System", "************ Failure starting system services", ex); |