Added the new RIL request to set SIM power state

The new RIL request for powering up/down the SIM card.

Test: Telephony sanity tests
bug: 32224755
Merged-In: Ib4204b9612fd9bc02bd99baebabf5ed7120e89fe
Change-Id: Ib4204b9612fd9bc02bd99baebabf5ed7120e89fe
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index 04d93db..bda7d65 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -1572,6 +1572,20 @@
     oneway setIndicationFilter(int32_t serial, bitfield<IndicationFilter> indicationFilter);
 
     /*
+     * Set SIM card power state.
+     * Request is equivalent to inserting or removing the card.
+     *
+     * The radio modem must generate IRadioIndication.simStatusChanged() as if the SIM had been
+     * inserted or removed.
+     *
+     * @param serial Serial number of request
+     * @param powerUp True if powering up the sim card
+     *
+     * Response callback is IRadioResponse.setSimCardPowerResponse()
+     */
+    oneway setSimCardPower(int32_t serial, bool powerUp);
+
+    /*
      * When response type received from a radio indication or radio response is
      * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
      * acknowledge the receipt of those messages by sending responseAcknowledgement().
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index dafd264..637f697 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -1968,6 +1968,18 @@
     oneway setIndicationFilterResponse(RadioResponseInfo info);
 
     /*
+     * @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:SIM_ABSENT
+     *   RadioError:INVALID_ARGUMENTS
+     */
+    oneway setSimCardPowerResponse(RadioResponseInfo info);
+
+    /*
      * Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
      * radio request which take long time to respond.
      * For more details, refer https://source.android.com/devices/tech/connect/ril.html
diff --git a/radio/1.0/vts/Radio.vts b/radio/1.0/vts/Radio.vts
index 74bdb8d..68cf620 100644
--- a/radio/1.0/vts/Radio.vts
+++ b/radio/1.0/vts/Radio.vts
@@ -1503,6 +1503,18 @@
     }
 
     api: {
+        name: "setSimCardPower"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    api: {
         name: "responseAcknowledgement"
     }
 
diff --git a/radio/1.0/vts/RadioResponse.vts b/radio/1.0/vts/RadioResponse.vts
index 99c953c..915a053 100644
--- a/radio/1.0/vts/RadioResponse.vts
+++ b/radio/1.0/vts/RadioResponse.vts
@@ -1389,6 +1389,14 @@
     }
 
     api: {
+        name: "setSimCardPowerResponse"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
+        }
+    }
+
+    api: {
         name: "acknowledgeRequest"
         arg: {
             type: TYPE_SCALAR