mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
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
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user