Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6902a757 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Use AIDL callbacks directly.

Bug: 210498497
Test: build cuttlefish with ag/16322062, watch logs
Change-Id: I1e0cd95f5f9a911564d14be2d8bbb328572de8c8
parent d2c6d679
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ cc_library {
    cflags: [
        "-Wall",
        "-Wextra",
        //"-Wold-style-cast",  // TODO(b/203699028) enable after aosp/1900880 gets merged
        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
    ],
    shared_libs: [
+0 −5
Original line number Diff line number Diff line
@@ -28,9 +28,4 @@ RadioCompatBase::RadioCompatBase(std::shared_ptr<DriverContext> context, sp<V1_5
      mRadioResponse(radioResponse),
      mRadioIndication(radioInd) {}

V1_6::IRadioResponse& RadioCompatBase::respond() {
    CHECK(mRadioResponse) << "This shouldn't happen (response functions are passed in constructor)";
    return *mRadioResponse;
}

}  // namespace android::hardware::radio::compat
+6 −6
Original line number Diff line number Diff line
@@ -27,12 +27,12 @@ RadioResponse::RadioResponse(std::shared_ptr<DriverContext> context) : mContext(
Return<void> RadioResponse::acknowledgeRequest(int32_t serial) {
    LOG_CALL << serial;
    // TODO(b/203699028): send to correct requestor or confirm if spam is not a problem
    if (mDataCb) mDataCb->acknowledgeRequest(serial);
    if (mMessagingCb) mMessagingCb->acknowledgeRequest(serial);
    if (mModemCb) mModemCb->acknowledgeRequest(serial);
    if (mNetworkCb) mNetworkCb->acknowledgeRequest(serial);
    if (mSimCb) mSimCb->acknowledgeRequest(serial);
    if (mVoiceCb) mVoiceCb->acknowledgeRequest(serial);
    if (mDataCb) mDataCb.get()->acknowledgeRequest(serial);
    if (mMessagingCb) mMessagingCb.get()->acknowledgeRequest(serial);
    if (mModemCb) mModemCb.get()->acknowledgeRequest(serial);
    if (mNetworkCb) mNetworkCb.get()->acknowledgeRequest(serial);
    if (mSimCb) mSimCb.get()->acknowledgeRequest(serial);
    if (mVoiceCb) mVoiceCb.get()->acknowledgeRequest(serial);
    return {};
}

+3 −3
Original line number Diff line number Diff line
@@ -20,11 +20,11 @@ namespace android::hardware::radio::compat {

namespace aidl = ::aidl::android::hardware::radio;

V1_6::RadioResponseInfo notSupported(int32_t serial) {
aidl::RadioResponseInfo notSupported(int32_t serial) {
    return {
            .type = V1_0::RadioResponseType::SOLICITED,
            .type = aidl::RadioResponseType::SOLICITED,
            .serial = serial,
            .error = V1_6::RadioError::REQUEST_NOT_SUPPORTED,
            .error = aidl::RadioError::REQUEST_NOT_SUPPORTED,
    };
}

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@

namespace android::hardware::radio::compat {

V1_6::RadioResponseInfo notSupported(int32_t serial);
aidl::android::hardware::radio::RadioResponseInfo notSupported(int32_t serial);

std::string toAidl(const hidl_string& str);
hidl_string toHidl(const std::string& str);
Loading