Update CardState HAL and make setSimPower synchronous
Bug: 171433370
Test: make; make vts
Change-Id: I0d298209a00f5f194547b0d6e368baa44b0c18ec
Merged-In: I0d298209a00f5f194547b0d6e368baa44b0c18ec
diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal
index ca40a17..66007b4 100644
--- a/radio/1.6/IRadio.hal
+++ b/radio/1.6/IRadio.hal
@@ -19,6 +19,7 @@
import @1.0::CdmaSmsMessage;
import @1.0::GsmSmsMessage;
+import @1.1::CardPowerState;
import @1.2::DataRequestReason;
import @1.5::IRadio;
import @1.5::AccessNetwork;
@@ -183,6 +184,42 @@
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.
*