Merge "Register new AIDL SensorManager" am: 0b703be0c5 am: 4ab7a43f65 am: efe53075fd

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292559

Change-Id: I71299fd6cbb290e3a34134bd8b3fa9d45db0d8da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Devin Moore
2022-11-18 20:11:36 +00:00
committed by Automerger Merge Worker
3 changed files with 75 additions and 36 deletions

View File

@@ -465,6 +465,7 @@ public final class SystemServer implements Dumpable {
private final long mRuntimeStartUptime;
private static final String START_HIDL_SERVICES = "StartHidlServices";
private static final String START_SENSOR_MANAGER_SERVICE = "StartISensorManagerService";
private static final String START_BLOB_STORE_SERVICE = "startBlobStoreManagerService";
private static final String SYSPROP_START_COUNT = "sys.system_server.start_count";
@@ -483,6 +484,9 @@ public final class SystemServer implements Dumpable {
/** Start the IStats services. This is a blocking call and can take time. */
private static native void startIStatsService();
/** Start the ISensorManager service. This is a blocking call and can take time. */
private static native void startISensorManagerService();
/**
* Start the memtrack proxy service.
*/
@@ -1568,9 +1572,16 @@ public final class SystemServer implements Dumpable {
wm.onInitReady();
t.traceEnd();
// Start receiving calls from HIDL services. Start in in a separate thread
// Start receiving calls from SensorManager services. Start in a separate thread
// because it need to connect to SensorManager. This has to start
// after PHASE_WAIT_FOR_SENSOR_SERVICE is done.
SystemServerInitThreadPool.submit(() -> {
TimingsTraceAndSlog traceLog = TimingsTraceAndSlog.newAsyncLog();
traceLog.traceBegin(START_SENSOR_MANAGER_SERVICE);
startISensorManagerService();
traceLog.traceEnd();
}, START_SENSOR_MANAGER_SERVICE);
SystemServerInitThreadPool.submit(() -> {
TimingsTraceAndSlog traceLog = TimingsTraceAndSlog.newAsyncLog();
traceLog.traceBegin(START_HIDL_SERVICES);