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
diff --git a/radio/aidl/compat/libradiocompat/modem/RadioModem.cpp b/radio/aidl/compat/libradiocompat/modem/RadioModem.cpp
index 3fff5ee..d28b940 100644
--- a/radio/aidl/compat/libradiocompat/modem/RadioModem.cpp
+++ b/radio/aidl/compat/libradiocompat/modem/RadioModem.cpp
@@ -28,7 +28,7 @@
constexpr auto ok = &ScopedAStatus::ok;
std::shared_ptr<aidl::IRadioModemResponse> RadioModem::respond() {
- return mRadioResponse->modemCb();
+ return mCallbackManager->response().modemCb();
}
ScopedAStatus RadioModem::enableModem(int32_t serial, bool on) {
@@ -133,16 +133,10 @@
}
ScopedAStatus RadioModem::setResponseFunctions(
- const std::shared_ptr<aidl::IRadioModemResponse>& modemResponse,
- const std::shared_ptr<aidl::IRadioModemIndication>& modemIndication) {
- LOG_CALL << modemResponse << ' ' << modemIndication;
-
- CHECK(modemResponse);
- CHECK(modemIndication);
-
- mRadioResponse->setResponseFunction(modemResponse);
- mRadioIndication->setResponseFunction(modemIndication);
-
+ const std::shared_ptr<aidl::IRadioModemResponse>& response,
+ const std::shared_ptr<aidl::IRadioModemIndication>& indication) {
+ LOG_CALL << response << ' ' << indication;
+ mCallbackManager->setResponseFunctions(response, indication);
return ok();
}