summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-05-11 22:04:46 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-11 22:04:46 +0000
commit3ce5a9b85b7e5435fa586ec7b82bd3f01b8e81d0 (patch)
treeaf009240429a7214ec437996359fc77f33790862
parent50ec69fa09cde8b71a68fe9f9fcf6ce684f93e4d (diff)
parentfc5304075e0a8f0711cea15cd96733bc2a5a11a3 (diff)
Merge "Fixed when SystemServerInitThreadPool.shutdown() is called." into rvc-dev
-rw-r--r--services/core/java/com/android/server/SystemServerInitThreadPool.java4
-rw-r--r--services/core/java/com/android/server/SystemServiceManager.java1
-rw-r--r--services/java/com/android/server/SystemServer.java1
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 fa3f33067e8e..2a200fb0ae2c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -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);