Merge "Fixed when SystemServerInitThreadPool.shutdown() is called." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-11 22:04:46 +00:00
committed by Android (Google) Code Review
3 changed files with 4 additions and 2 deletions

View File

@@ -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");

View File

@@ -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();
}
}

View File

@@ -590,7 +590,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);