Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11e84766 authored by Chris Phoenix's avatar Chris Phoenix
Browse files

sensors HAL uses "default" service name

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: Iefb6dfe80ec8f4ab389d2b6529f9f968365289b2
parent 58de4262
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,5 +23,5 @@ using android::hardware::sensors::V1_0::ISensors;
using android::hardware::defaultPassthroughServiceImplementation;

int main() {
    return defaultPassthroughServiceImplementation<ISensors>("sensors");
    return defaultPassthroughServiceImplementation<ISensors>();
}
+1 −3
Original line number Diff line number Diff line
@@ -41,8 +41,6 @@ using ::android::hardware::hidl_string;
using ::android::sp;
using namespace ::android::hardware::sensors::V1_0;

#define SENSORS_SERVICE_NAME "sensors"

// Test environment for sensors
class SensorsHidlEnvironment : public ::testing::Environment {
 public:
@@ -82,7 +80,7 @@ class SensorsHidlEnvironment : public ::testing::Environment {
};

void SensorsHidlEnvironment::SetUp() {
  sensors = ISensors::getService(SENSORS_SERVICE_NAME, false);
  sensors = ISensors::getService(false);
  ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
  ASSERT_NE(sensors, nullptr);