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

Commit da8cd066 authored by Jordan Liu's avatar Jordan Liu
Browse files

Update CardState HAL and make setSimPower synchronous

Bug: 171433370
Test: make; make vts
Change-Id: I0d298209a00f5f194547b0d6e368baa44b0c18ec
Merged-In: I0d298209a00f5f194547b0d6e368baa44b0c18ec
parent d6e31543
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -771,7 +771,7 @@ a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardwar
cd84ab19c590e0e73dd2307b591a3093ee18147ef95e6d5418644463a6620076 android.hardware.neuralnetworks@1.2::IDevice
9625e85f56515ad2cf87b6a1847906db669f746ea4ab02cd3d4ca25abc9b0109 android.hardware.neuralnetworks@1.2::types
9e758e208d14f7256e0885d6d8ad0b61121b21d8c313864f981727ae55bffd16 android.hardware.neuralnetworks@1.3::types
7da2707d4cf93818eaf8038eb65e2180116a399c310e594a00935c5c981aa340 android.hardware.radio@1.0::types
0f53d70e1eadf8d987766db4bf6ae2048004682168f4cab118da576787def3fa android.hardware.radio@1.0::types

# HALs released in Android S
# NOTE: waiting to freeze HALs until later in the release
+6 −2
Original line number Diff line number Diff line
@@ -166,11 +166,15 @@ enum RestrictedState : int32_t {
};

enum CardState : int32_t {
    /* card is physically absent from device. (Some old modems use CardState.ABSENT when the SIM
       is powered off. This is no longer correct, however the platform will still support this
       legacy behavior.) */
    ABSENT,
    /* card is inserted in the device */
    PRESENT,
    ERROR,
    RESTRICTED,                           // card is present but not usable due to carrier
                                          // restrictions
    /* card is present but not usable due to carrier restrictions */
    RESTRICTED,
};

enum PinState : int32_t {
+37 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.radio@1.6;

import @1.0::CdmaSmsMessage;
import @1.0::GsmSmsMessage;
import @1.1::CardPowerState;
import @1.2::DataRequestReason;
import @1.5::IRadio;
import @1.5::AccessNetwork;
@@ -182,6 +183,42 @@ interface IRadio extends @1.5::IRadio {
     */
    oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);

    /**
     * Set SIM card power state.
     * Request is used to power off or power on the card. It should not generate
     * a CardState.CARDSTATE_ABSENT indication, since the SIM is still physically
     * inserted.
     *
     * @param serial Serial number of request
     * @param powerUp POWER_DOWN if powering down the SIM card,
     *                POWER_UP if powering up the SIM card,
     *                POWER_UP_PASS_THROUGH if powering up the SIM card in
     *                                      pass through mode.
     *
     * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send
     * any command to it (for example SELECT of MF, or TERMINAL
     * CAPABILITY), and the SIM card is controlled completely by Telephony
     * sending APDUs directly. The SIM card state must be
     * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
     * No new error code is generated. Emergency calls are supported in
     * the same way as if the SIM card is absent.
     * Pass-through mode is valid only for the specific card session where
     * it is activated, and normal behavior occurs at the next SIM
     * initialization, unless POWER_UP_PASS_THROUGH is requested again.
     *
     * The device is required to power down the SIM card before it can
     * switch the mode between POWER_UP and POWER_UP_PASS_THROUGH.
     * At device power up, the SIM interface is powered up automatically.
     * Each subsequent request to this method is processed only after the
     * completion of the previous one.
     *
     * Response callback is IRadioResponse.setSimCardPowerResponse_1_6().
     * Note that this differs from setSimCardPower_1_1 in that the response
     * callback should only be sent once the device has finished executing
     * the request (the SIM has finished powering on or off).
     */
    oneway setSimCardPower_1_6(int32_t serial, CardPowerState powerUp);

    /**
     * Enable or disable E-UTRA-NR dual connectivity. If disabled then UE will not connect
     * to secondary carrier.
+16 −0
Original line number Diff line number Diff line
@@ -201,6 +201,22 @@ interface IRadioResponse extends @1.5::IRadioResponse {
     */
    oneway sendCdmaSmsExpectMoreResponse_1_6(RadioResponseInfo info, SendSmsResult sms);

    /**
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:SIM_ERR (indicates a timeout or other issue making the SIM unresponsive)
     *
     * Note that this differs from setSimCardPowerResponse_1_1 in that the response
     * should only be sent once the request from setSimCardPower_1_6 is complete
     * (the SIM has finished powering on or off).
     */
    oneway setSimCardPowerResponse_1_6(RadioResponseInfo info);

    /**
     * @param info Response info struct containing response type, serial no. and error
     *
+3 −0
Original line number Diff line number Diff line
@@ -763,6 +763,9 @@ class RadioResponse_v1_6 : public ::android::hardware::radio::V1_6::IRadioRespon
            const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
            const SendSmsResult& sms);

    Return<void> setSimCardPowerResponse_1_6(
            const ::android::hardware::radio::V1_6::RadioResponseInfo& info);

    Return<void> sendCdmaSmsExpectMoreResponse_1_6(
            const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
            const SendSmsResult& sms);
Loading