Audio Aidl: Update binder::Status return code handling
Add statusTFromBinderStatus() and binderStatusFromStatusT()
as methods to standardize binder status codes for native
audio service cross-language compatibility.
Test: atest audio_aidl_status_tests
Bug: 175338323
Change-Id: I48c543689d5a9a464c0d68fb6263dedff43ceca9
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index eaad6ef..3ab7737 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -60,6 +60,7 @@
namespace android {
+using aidl_utils::statusTFromBinderStatus;
using binder::Status;
namespace {
@@ -3027,7 +3028,7 @@
bs = handle.second->disable(&status);
}
if (!bs.isOk()) {
- status = bs.transactionError();
+ status = statusTFromBinderStatus(bs);
}
}
}
@@ -3142,7 +3143,7 @@
bs = (*handle)->disable(&status);
}
if (!bs.isOk()) {
- status = bs.transactionError();
+ status = statusTFromBinderStatus(bs);
}
}
return status;