Merge "Add BarringInfo to Cuttlefish RIL for Radio 1.5"
diff --git a/guest/hals/ril/libril/ril_service.cpp b/guest/hals/ril/libril/ril_service.cpp
index fed38ab..7349845 100755
--- a/guest/hals/ril/libril/ril_service.cpp
+++ b/guest/hals/ril/libril/ril_service.cpp
@@ -558,6 +558,7 @@
bool preferredForEmergencyCall);
Return<void> setIndicationFilter_1_5(int32_t serial,
hidl_bitfield<::android::hardware::radio::V1_5::IndicationFilter> indicationFilter);
+ Return<void> getBarringInfo(int32_t serial);
};
struct OemHookImpl : public IOemHook {
@@ -3775,6 +3776,14 @@
return Void();
}
+Return<void> RadioImpl_1_5::getBarringInfo(int32_t /* serial */) {
+ // TODO implement
+#if VDBG
+ RLOGE("[%04d]< %s", serial, "Method is not implemented");
+#endif
+ return Void();
+}
+
// OEM hook methods:
Return<void> OemHookImpl::setResponseFunctions(
const ::android::sp<IOemHookResponse>& oemHookResponseParam,
@@ -8141,6 +8150,28 @@
return 0;
}
+int radio_1_5::getBarringInfoResponse(int slotId,
+ int responseType, int serial, RIL_Errno e,
+ void *response, size_t responselen) {
+#if VDBG
+ RLOGD("getBarringInfoResponse: serial %d", serial);
+#endif
+
+ if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+ RadioResponseInfo responseInfo = {};
+ populateResponseInfo(responseInfo, serial, responseType, e);
+ hidl_vec<::android::hardware::radio::V1_5::BarringInfo> barringInfo;
+ Return<void> retStatus
+ = radioService[slotId]->mRadioResponseV1_5->
+ getBarringInfoResponse(responseInfo, barringInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGE("getBarringInfoResponse: radioService[%d]->mRadioResponse == NULL",
+ slotId);
+ }
+
+ return 0;
+}
/***************************************************************************************************
* INDICATION FUNCTIONS
diff --git a/guest/hals/ril/libril/ril_service.h b/guest/hals/ril/libril/ril_service.h
index 98ebfa2..7807004 100644
--- a/guest/hals/ril/libril/ril_service.h
+++ b/guest/hals/ril/libril/ril_service.h
@@ -804,6 +804,9 @@
int setIndicationFilterResponse_1_5(int slotId, int responseType, int serial, RIL_Errno e,
void *response, size_t responselen);
+int getBarringInfoResponse(int slotId, int responseType, int serial, RIL_Errno e,
+ void *response, size_t responselen);
+
pthread_rwlock_t * getRadioServiceRwlock(int slotId);
void setNitzTimeReceived(int slotId, long timeReceived);