summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2016-10-11 21:07:51 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-10-11 21:07:51 +0000
commitfcf7c5478070c37d9ac5bc9e809867373e7aa847 (patch)
tree543b57533a8b7d666efa6b7d236a655a3bd1b6f7
parentb0e5b164f1f37889d89b4cb97ecd31dbd01c5c70 (diff)
parent182f980f9ced6a9c1b3b6913bf55db38a58d0911 (diff)
downloadplatform_hardware_interfaces-fcf7c5478070c37d9ac5bc9e809867373e7aa847.tar.gz
platform_hardware_interfaces-fcf7c5478070c37d9ac5bc9e809867373e7aa847.tar.bz2
platform_hardware_interfaces-fcf7c5478070c37d9ac5bc9e809867373e7aa847.zip
wifi: Invoke failure callbacks am: f243631af8 am: de95c70497 am: 77b9999d20
am: 182f980f9c Change-Id: I529aee41677d1dbb4810fe4ca93f948bf89b8f8a
-rw-r--r--wifi/1.0/default/wifi_chip.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/wifi/1.0/default/wifi_chip.cpp b/wifi/1.0/default/wifi_chip.cpp
index 82dce942d0..4dd020b592 100644
--- a/wifi/1.0/default/wifi_chip.cpp
+++ b/wifi/1.0/default/wifi_chip.cpp
@@ -113,6 +113,11 @@ Return<void> WifiChip::requestChipDebugInfo() {
if (ret.first != WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get driver version: "
<< LegacyErrorToString(ret.first);
+ FailureReason reason = CreateFailureReasonLegacyError(
+ ret.first, " failed to get driver version");
+ for (const auto& callback : callbacks_) {
+ callback->onChipDebugInfoFailure(reason);
+ }
return Void();
}
result.driverDescription = ret.second.c_str();
@@ -121,6 +126,11 @@ Return<void> WifiChip::requestChipDebugInfo() {
if (ret.first != WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get firmware version: "
<< LegacyErrorToString(ret.first);
+ FailureReason reason = CreateFailureReasonLegacyError(
+ ret.first, " failed to get firmware version");
+ for (const auto& callback : callbacks_) {
+ callback->onChipDebugInfoFailure(reason);
+ }
return Void();
}
result.firmwareDescription = ret.second.c_str();
@@ -140,6 +150,10 @@ Return<void> WifiChip::requestDriverDebugDump() {
if (ret.first != WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get driver debug dump: "
<< LegacyErrorToString(ret.first);
+ FailureReason reason = CreateFailureReasonLegacyError(ret.first, "");
+ for (const auto& callback : callbacks_) {
+ callback->onDriverDebugDumpFailure(reason);
+ }
return Void();
}
@@ -162,6 +176,10 @@ Return<void> WifiChip::requestFirmwareDebugDump() {
if (ret.first != WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get firmware debug dump: "
<< LegacyErrorToString(ret.first);
+ FailureReason reason = CreateFailureReasonLegacyError(ret.first, "");
+ for (const auto& callback : callbacks_) {
+ callback->onFirmwareDebugDumpFailure(reason);
+ }
return Void();
}