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); } }