Set HAL response functions after framework sets all of theirs.
Bug: 207695009
Test: Build with ag/16322062 and a handful of patches from b/207695009,
try to use telephony stack
Change-Id: I74afe105a22a24efa0c38de20c75beffc58b144f
Merged-In: I74afe105a22a24efa0c38de20c75beffc58b144f
diff --git a/radio/aidl/compat/libradiocompat/data/RadioData.cpp b/radio/aidl/compat/libradiocompat/data/RadioData.cpp
index 91529c9..d2f3687 100644
--- a/radio/aidl/compat/libradiocompat/data/RadioData.cpp
+++ b/radio/aidl/compat/libradiocompat/data/RadioData.cpp
@@ -32,7 +32,7 @@
constexpr auto ok = &ScopedAStatus::ok;
std::shared_ptr<aidl::IRadioDataResponse> RadioData::respond() {
- return mRadioResponse->dataCb();
+ return mCallbackManager->response().dataCb();
}
ScopedAStatus RadioData::allocatePduSessionId(int32_t serial) {
@@ -129,16 +129,10 @@
}
ScopedAStatus RadioData::setResponseFunctions(
- const std::shared_ptr<aidl::IRadioDataResponse>& dataResponse,
- const std::shared_ptr<aidl::IRadioDataIndication>& dataIndication) {
- LOG_CALL << dataResponse << ' ' << dataIndication;
-
- CHECK(dataResponse);
- CHECK(dataIndication);
-
- mRadioResponse->setResponseFunction(dataResponse);
- mRadioIndication->setResponseFunction(dataIndication);
-
+ const std::shared_ptr<aidl::IRadioDataResponse>& response,
+ const std::shared_ptr<aidl::IRadioDataIndication>& indication) {
+ LOG_CALL << response << ' ' << indication;
+ mCallbackManager->setResponseFunctions(response, indication);
return ok();
}