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/sim/RadioSim.cpp b/radio/aidl/compat/libradiocompat/sim/RadioSim.cpp
index e72ac7e..b43f64f 100644
--- a/radio/aidl/compat/libradiocompat/sim/RadioSim.cpp
+++ b/radio/aidl/compat/libradiocompat/sim/RadioSim.cpp
@@ -31,7 +31,7 @@
constexpr auto ok = &ScopedAStatus::ok;
std::shared_ptr<aidl::IRadioSimResponse> RadioSim::respond() {
- return mRadioResponse->simCb();
+ return mCallbackManager->response().simCb();
}
ScopedAStatus RadioSim::areUiccApplicationsEnabled(int32_t serial) {
@@ -221,16 +221,10 @@
}
ScopedAStatus RadioSim::setResponseFunctions(
- const std::shared_ptr<aidl::IRadioSimResponse>& simResponse,
- const std::shared_ptr<aidl::IRadioSimIndication>& simIndication) {
- LOG_CALL << simResponse << ' ' << simIndication;
-
- CHECK(simResponse);
- CHECK(simIndication);
-
- mRadioResponse->setResponseFunction(simResponse);
- mRadioIndication->setResponseFunction(simIndication);
-
+ const std::shared_ptr<aidl::IRadioSimResponse>& response,
+ const std::shared_ptr<aidl::IRadioSimIndication>& indication) {
+ LOG_CALL << response << ' ' << indication;
+ mCallbackManager->setResponseFunctions(response, indication);
return ok();
}