Support different SIM power states
Test: Verify SIM power states
Bug: 35844036
Change-Id: Ifd816f27d69479954f21ddb497cdc25231ece25e
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 97383b5..d121952 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3813,19 +3813,22 @@
}
/**
- * 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();
Phone phone = PhoneFactory.getPhone(slotIndex);
if (phone != null) {
- phone.setSimPowerState(powerUp);
+ phone.setSimPowerState(state);
}
}