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

Commit 07bac60f authored by Roshan Pius's avatar Roshan Pius Committed by android-build-merger
Browse files

wifi(vts): Ignore IWifi.stop() returning ERROR_NOT_AVAILABLE

am: 8c216524

Change-Id: I1bf9be99d4e673209edb893040483bf772ee3ca0
parents ffd04a5d 8c216524
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -206,5 +206,7 @@ bool configureChipToSupportIfaceType(const sp<IWifiChip>& wifi_chip,
void stopWifi() {
    sp<IWifi> wifi = getWifi();
    ASSERT_NE(wifi, nullptr);
    ASSERT_EQ(HIDL_INVOKE(wifi, stop).code, WifiStatusCode::SUCCESS);
    const auto status = HIDL_INVOKE(wifi, stop);
    ASSERT_TRUE((status.code == WifiStatusCode::SUCCESS) ||
                (status.code == WifiStatusCode::ERROR_NOT_AVAILABLE));
}
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ using android::hardware::joinRpcThreadpool;
int main(int /*argc*/, char** argv) {
  android::base::InitLogging(argv,
                             android::base::LogdLogger(android::base::SYSTEM));
  LOG(INFO) << "Wifi Hal is starting up...";
  LOG(INFO) << "Wifi Hal is booting up...";

  configureRpcThreadpool(1, true /* callerWillJoin */);

+4 −2
Original line number Diff line number Diff line
@@ -108,14 +108,15 @@ WifiStatus Wifi::startInternal() {
        LOG(ERROR) << "Failed to invoke onStart callback";
      };
    }
    LOG(INFO) << "Wifi HAL started";
  } else {
    for (const auto& callback : event_cb_handler_.getCallbacks()) {
      if (!callback->onFailure(wifi_status).isOk()) {
        LOG(ERROR) << "Failed to invoke onFailure callback";
      }
    }
    LOG(ERROR) << "Wifi HAL start failed";
  }
  LOG(INFO) << "Wifi HAL started";
  return wifi_status;
}

@@ -139,14 +140,15 @@ WifiStatus Wifi::stopInternal() {
        LOG(ERROR) << "Failed to invoke onStop callback";
      };
    }
    LOG(INFO) << "Wifi HAL stopped";
  } else {
    for (const auto& callback : event_cb_handler_.getCallbacks()) {
      if (!callback->onFailure(wifi_status).isOk()) {
        LOG(ERROR) << "Failed to invoke onFailure callback";
      }
    }
    LOG(ERROR) << "Wifi HAL stop failed";
  }
  LOG(INFO) << "Wifi HAL stopped";
  return wifi_status;
}