Support different SIM power states
Test: Verify SIM power states
Bug: 35844036
Merged-In: Ifd816f27d69479954f21ddb497cdc25231ece25e
Change-Id: Ifd816f27d69479954f21ddb497cdc25231ece25e
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index a5f9c07..3c6dd65 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3694,14 +3694,17 @@
}
/**
- * Set SIM card power state. Request is equivalent to inserting or removing the card.
+ * Set SIM card power state.
*
* @param slotIndex SIM slot id.
- * @param powerUp True if powering up the SIM, otherwise powering down
+ * @param state State of SIM (power down, power up, pass through)
+ * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN}
+ * - {@link android.telephony.TelephonyManager#CARD_POWER_UP}
+ * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH}
*
**/
@Override
- public void setSimPowerStateForSlot(int slotIndex, boolean powerUp) {
+ public void setSimPowerStateForSlot(int slotIndex, int state) {
enforceModifyPermission();
int subId[] = mSubscriptionController.getSubIdUsingSlotIndex(slotIndex);
if (subId == null || subId.length == 0) {
@@ -3710,7 +3713,7 @@
final Phone phone = getPhone(subId[0]);
if (phone != null) {
- phone.setSimPowerState(powerUp);
+ phone.setSimPowerState(state);
}
}