summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authorSudheer Shanka <sudheersai@google.com>2020-01-27 12:10:01 -0800
committerSudheer Shanka <sudheersai@google.com>2020-01-31 15:22:16 -0800
commit95bd54110335392ba9ebbbda75cc150740f96fe2 (patch)
tree4807d7a067992c6b9301854ccb627bb11b17721b /services/java/com/android/server/SystemServer.java
parent424ad90712a5dfc869af48d04354786ebe6fbb55 (diff)
Invoke BlobStoreManagerService.onStart() asynchronously.
Bug: 148299993 Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java Test: tradefed.sh run google/template/local --template:map \ test google/continuous/boot-successive \ --no-first-boot --successive-boot --boot-count 10 Test: tradefed.sh run google/template/local --template:map \ test google/continuous/boot-successive \ --no-first-boot --successive-boot --boot-count 2 --granular-boot-info Change-Id: I99e3ca1c28a47e6a855c6d61295e9ddb4b4ac29c
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 258d7628e502..a6f6b74464d7 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -343,6 +343,7 @@ public final class SystemServer {
private static final String START_SENSOR_SERVICE = "StartSensorService";
private static final String START_HIDL_SERVICES = "StartHidlServices";
+ private static final String START_BLOB_STORE_SERVICE = "startBlobStoreManagerService";
private static final String SYSPROP_START_COUNT = "sys.system_server.start_count";
private static final String SYSPROP_START_ELAPSED = "sys.system_server.start_elapsed";
@@ -350,6 +351,7 @@ public final class SystemServer {
private Future<?> mSensorServiceStart;
private Future<?> mZygotePreload;
+ private Future<?> mBlobStoreServiceStart;
/**
* Start the sensor service. This is a blocking call and can take time.
@@ -1783,6 +1785,13 @@ public final class SystemServer {
t.traceEnd();
}
+ mBlobStoreServiceStart = SystemServerInitThreadPool.submit(() -> {
+ final TimingsTraceAndSlog traceLog = TimingsTraceAndSlog.newAsyncLog();
+ traceLog.traceBegin(START_BLOB_STORE_SERVICE);
+ mSystemServiceManager.startService(BLOB_STORE_MANAGER_SERVICE_CLASS);
+ traceLog.traceEnd();
+ }, START_BLOB_STORE_SERVICE);
+
// Dreams (interactive idle-time views, a/k/a screen savers, and doze mode)
t.traceBegin("StartDreamManager");
mSystemServiceManager.startService(DreamManagerService.class);
@@ -2027,10 +2036,6 @@ public final class SystemServer {
mSystemServiceManager.startService(ClipboardService.class);
t.traceEnd();
- t.traceBegin("StartBlobStoreManagerService");
- mSystemServiceManager.startService(BLOB_STORE_MANAGER_SERVICE_CLASS);
- t.traceEnd();
-
t.traceBegin("AppServiceManager");
mSystemServiceManager.startService(AppBindingService.Lifecycle.class);
t.traceEnd();
@@ -2149,6 +2154,9 @@ public final class SystemServer {
mSystemServiceManager.startService(APP_SEARCH_MANAGER_SERVICE_CLASS);
t.traceEnd();
+ ConcurrentUtils.waitForFutureNoInterrupt(mBlobStoreServiceStart,
+ START_BLOB_STORE_SERVICE);
+
// These are needed to propagate to the runnable below.
final NetworkManagementService networkManagementF = networkManagement;
final NetworkStatsService networkStatsF = networkStats;