OSDN Git Service

sensors HAL uses "default" service name
authorChris Phoenix <cphoenix@google.com>
Sat, 21 Jan 2017 04:06:28 +0000 (20:06 -0800)
committerChris Phoenix <cphoenix@google.com>
Sat, 21 Jan 2017 04:34:48 +0000 (20:34 -0800)
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; verify HAL still works

Bug: 33844934
Change-Id: I83295febf0fd9e63cbbbc0b3c57962ec5961cee5

services/sensorservice/SensorDeviceTreble.cpp

index 2877589..0a75400 100644 (file)
@@ -55,7 +55,7 @@ static status_t StatusFromResult(Result result) {
 }
 
 SensorDevice::SensorDevice() {
-    mSensors = ISensors::getService("sensors");
+    mSensors = ISensors::getService();
 
     if (mSensors == NULL) {
         return;
@@ -630,4 +630,3 @@ void SensorDevice::convertToSensorEvents(
 
 // ---------------------------------------------------------------------------
 }; // namespace android
-