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
This commit is contained in:
Brian Stack
2018-10-03 09:21:02 -07:00
committed by Brian Duddie
parent c3ea432da9
commit 5b23ad3c83

View File

@@ -17,6 +17,7 @@
#include <jni.h>
#include <nativehelper/JNIHelp.h>
#include <binder/IServiceManager.h>
#include <hidl/HidlTransportSupport.h>
#include <schedulerservice/SchedulingPolicyService.h>
@@ -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);
}
}