From 5b23ad3c8336f74976bf23231fe0db53cc0f3045 Mon Sep 17 00:00:00 2001 From: Brian Stack Date: Wed, 3 Oct 2018 09:21:02 -0700 Subject: [PATCH] Increase Sensor Service dumpsys priority Increase the Sensor Service's dumpsys priority to critical to ensure that sensor events are not lost. Bug: 117121413 Test: Verified Sensor Service is in the critical portion of dumpsys Test: CTS Sensor tests pass Change-Id: I9d1726f67cdcc9a01ea192cd8925664c2f3fbc30 --- services/core/jni/com_android_server_SystemServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/jni/com_android_server_SystemServer.cpp b/services/core/jni/com_android_server_SystemServer.cpp index 3901cebcc7874..dc0d53b41595c 100644 --- a/services/core/jni/com_android_server_SystemServer.cpp +++ b/services/core/jni/com_android_server_SystemServer.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -34,7 +35,8 @@ static void android_server_SystemServer_startSensorService(JNIEnv* /* env */, jo char propBuf[PROPERTY_VALUE_MAX]; property_get("system_init.startsensorservice", propBuf, "1"); if (strcmp(propBuf, "1") == 0) { - SensorService::instantiate(); + SensorService::publish(false /* allowIsolated */, + IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL); } }