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

Commit ab8166fa authored by Chris Phoenix's avatar Chris Phoenix
Browse files

wifi 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

In support of b/33844934

Change-Id: Ia086509b3433976524bc4a0ac4b24385840ce565
parent 742c4db3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ int main(int /*argc*/, char** argv) {
  // Setup hwbinder service
  android::sp<android::hardware::wifi::V1_0::IWifi> service =
      new android::hardware::wifi::V1_0::implementation::Wifi();
  CHECK_EQ(service->registerAsService("wifi"), android::NO_ERROR)
  CHECK_EQ(service->registerAsService(), android::NO_ERROR)
      << "Failed to register wifi HAL";

  joinRpcThreadpool();
+1 −3
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@ using ::android::sp;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;

const char kWifiServiceName[] = "wifi";

void stopFramework() {
    ASSERT_EQ(std::system("svc wifi disable"), 0);
    sleep(5);
@@ -44,7 +42,7 @@ void stopFramework() {
void startFramework() { ASSERT_EQ(std::system("svc wifi enable"), 0); }

sp<IWifi> getWifi() {
    sp<IWifi> wifi = IWifi::getService(kWifiServiceName);
    sp<IWifi> wifi = IWifi::getService();
    return wifi;
}