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

Commit edd5a0b1 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Automerger Merge Worker
Browse files

Fix minor TODOs in HIDL-AIDL translation shim am: 9c922979

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1937405

Change-Id: Id1bcea1e483f4bd15ecbe8fbff3ff9c59c874697
parents 1478a6ff 9c922979
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -26,7 +26,10 @@ 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
    /* We send ACKs to all callbacks instead of the one requested it to make implementation simpler.
     * If it turns out to be a problem, we would have to track where serials come from and make sure
     * this tracking data (e.g. a map) doesn't grow indefinitely.
     */
    if (mDataCb) mDataCb.get()->acknowledgeRequest(serial);
    if (mMessagingCb) mMessagingCb.get()->acknowledgeRequest(serial);
    if (mModemCb) mModemCb.get()->acknowledgeRequest(serial);
+13 −8
Original line number Diff line number Diff line
@@ -255,7 +255,13 @@ ScopedAStatus RadioNetwork::setResponseFunctions(
ScopedAStatus RadioNetwork::setSignalStrengthReportingCriteria(
        int32_t serial, const std::vector<aidl::SignalThresholdInfo>& infos) {
    LOG_CALL << serial;
    // TODO(b/203699028): how about other infos?
    if (infos.size() == 0) {
        LOG(ERROR) << "Threshold info array is empty - dropping setSignalStrengthReportingCriteria";
        return ok();
    }
    if (infos.size() > 1) {
        LOG(WARNING) << "Multi-element reporting criteria are not supported with HIDL HAL";
    }
    mHal1_5->setSignalStrengthReportingCriteria_1_5(serial, toHidl(infos[0]),
                                                    V1_5::AccessNetwork(infos[0].ran));
    return ok();
@@ -292,18 +298,17 @@ ScopedAStatus RadioNetwork::supplyNetworkDepersonalization(int32_t ser, const st
    return ok();
}

// TODO(b/210498497): is there a cleaner way to send a response back to Android, even though these
// methods must never be called?
ScopedAStatus RadioNetwork::setUsageSetting(
        int32_t ser, ::aidl::android::hardware::radio::network::UsageSetting) {
    LOG_CALL << ser;
ScopedAStatus RadioNetwork::setUsageSetting(int32_t serial, aidl::UsageSetting) {
    LOG_CALL << serial;
    LOG(ERROR) << "setUsageSetting is unsupported by HIDL HALs";
    respond()->setUsageSettingResponse(notSupported(serial));
    return ok();
}

ScopedAStatus RadioNetwork::getUsageSetting(int32_t ser) {
    LOG_CALL << ser;
ScopedAStatus RadioNetwork::getUsageSetting(int32_t serial) {
    LOG_CALL << serial;
    LOG(ERROR) << "getUsageSetting is unsupported by HIDL HALs";
    respond()->getUsageSettingResponse(notSupported(serial), {});  // {} = neither voice nor data
    return ok();
}