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

Commit ede1e95b authored by Shinsuke Ishioka's avatar Shinsuke Ishioka Committed by Masaya Nemoto
Browse files

Receive forwarded number from Modem

Adds forwarded number to Call information

Update 1.6 HAL:
- Added Call
- Added getCurrentCalls_1_6
- Added getCurrentCallsResponse_1_6

Test: Build pass.
Bug: 29063067

Change-Id: I8e43439e5638b7820d156d8fc6fe963cf1edf6f0
parent 3f4034f0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -406,4 +406,13 @@ interface IRadio extends @1.5::IRadio {
     * Response function is IRadioResponse.getDataRegistrationStateResponse_1_6()
     */
    oneway getDataRegistrationState_1_6(int32_t serial);

    /**
     * Requests current call list
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getCurrentCallsResponse_1_6()
     */
    oneway getCurrentCalls_1_6(int32_t serial);
};
+13 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.hardware.radio@1.6;

import @1.0::SendSmsResult;
import @1.5::IRadioResponse;
import @1.6::Call;
import @1.6::CellInfo;
import @1.6::RegStateResult;
import @1.6::RadioResponseInfo;
@@ -383,4 +384,16 @@ interface IRadioResponse extends @1.5::IRadioResponse {
     */
    oneway getDataRegistrationStateResponse_1_6(RadioResponseInfo info,
            RegStateResult dataRegResponse);

    /**
     * @param calls Current call list
     *   RadioError:NO_MEMORY
     *   RadioError:INTERNAL_ERR
     *   RadioError:SYSTEM_ERR
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:NO_RESOURCES
     *   RadioError:CANCELLED
     */
    oneway getCurrentCallsResponse_1_6(RadioResponseInfo info, vec<Call> calls);
};
+10 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import @1.0::RadioError;
import @1.0::RadioResponseType;
import @1.0::RegState;
import @1.1::ScanStatus;
import @1.2::Call;
import @1.2::CellInfoCdma;
import @1.2::CellConnectionStatus;
import @1.2::TdscdmaSignalStrength;
@@ -723,3 +724,12 @@ struct RegStateResult {
        } ngranInfo;
    } accessTechnologySpecificInfo;
};

struct Call {
    @1.2::Call base;
    /**
     * Forwarded number. It can set only one forwarded number based on 3GPP rule of the CS.
     * Reference: 3GPP TS 24.008 section 10.5.4.21b
     */
    string forwardedNumber;
};
+12 −0
Original line number Diff line number Diff line
@@ -406,3 +406,15 @@ TEST_P(RadioHidlTest_v1_6, setSimCardPower_1_6) {
        EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState);
    }
}

/*
 * Test IRadio.getCurrentCalls_1_6() for the response returned.
 */
TEST_P(RadioHidlTest_v1_6, getCurrentCalls_1_6) {
    serial = GetRandomSerialNumber();
    radio_v1_6->getCurrentCalls_1_6(serial);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
    EXPECT_EQ(::android::hardware::radio::V1_6::RadioError::NONE, radioRsp_v1_6->rspInfo.error);
}
+4 −0
Original line number Diff line number Diff line
@@ -815,6 +815,10 @@ class RadioResponse_v1_6 : public ::android::hardware::radio::V1_6::IRadioRespon
    Return<void> getDataRegistrationStateResponse_1_6(
            const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
            const ::android::hardware::radio::V1_6::RegStateResult& regResponse);

    Return<void> getCurrentCallsResponse_1_6(
            const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
            const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& calls);
};

/* Callback class for radio indication */
Loading