[DO NOT MERGE] Revert "Migrate getSimStateForSlotIndex to TelephonyManager"
Revert submission 2481148-getSimStateForSlotIndex
Reason for revert: trying to find culprit for https://android-build.googleplex.com/builds/tests/view?testResultId=TR96728544297958511&legacy=&invocationId=I86700010138773900
Reverted changes: /q/submissionid:2481148-getSimStateForSlotIndex
Change-Id: I830454a1a1280db8e4cadcae427ae088b29ae38f
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 976799a..ccace4c 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -109,7 +109,6 @@
import android.telephony.TelephonyFrameworkInitializer;
import android.telephony.TelephonyHistogram;
import android.telephony.TelephonyManager;
-import android.telephony.TelephonyManager.SimState;
import android.telephony.TelephonyScanManager;
import android.telephony.ThermalMitigationRequest;
import android.telephony.UiccCardInfo;
@@ -166,7 +165,6 @@
import com.android.internal.telephony.INumberVerificationCallback;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.IccCard;
-import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.IccLogicalChannelRequest;
import com.android.internal.telephony.LocaleTracker;
import com.android.internal.telephony.NetworkScanRequestTracker;
@@ -11328,36 +11326,5 @@
}
}
- /**
- * Get the SIM state for the slot index.
- * For Remote-SIMs, this method returns {@link IccCardConstants.State#UNKNOWN}
- *
- * @return SIM state as the ordinal of {@link IccCardConstants.State}
- */
- @Override
- @SimState
- public int getSimStateForSlotIndex(int slotIndex) {
- IccCardConstants.State simState;
- if (slotIndex < 0) {
- simState = IccCardConstants.State.UNKNOWN;
- } else {
- Phone phone = null;
- try {
- phone = PhoneFactory.getPhone(slotIndex);
- } catch (IllegalStateException e) {
- // ignore
- }
- if (phone == null) {
- simState = IccCardConstants.State.UNKNOWN;
- } else {
- IccCard icc = phone.getIccCard();
- if (icc == null) {
- simState = IccCardConstants.State.UNKNOWN;
- } else {
- simState = icc.getState();
- }
- }
- }
- return simState.ordinal();
- }
+
}