Merge "Remove old migration from subId to ICCID" am: a3587af6bf am: 4e1f155a2a am: 094ecd8ba1
Change-Id: I5333846e2e00bec826d5c8345f32ca3c9dc184a1
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index adfae1b..2975d06 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -41,7 +41,6 @@
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
import android.telephony.PhoneStateListener;
-import com.android.telephony.Rlog;
import android.telephony.ServiceState;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
@@ -62,6 +61,7 @@
import com.android.phone.PhoneGlobals;
import com.android.phone.PhoneUtils;
import com.android.phone.R;
+import com.android.telephony.Rlog;
import java.util.Arrays;
import java.util.LinkedList;
@@ -1315,30 +1315,6 @@
// Clean up any PhoneAccounts that are no longer relevant
cleanupPhoneAccounts();
-
- // At some point, the phone account ID was switched from the subId to the iccId.
- // If there is a default account, check if this is the case, and upgrade the default account
- // from using the subId to iccId if so.
- PhoneAccountHandle defaultPhoneAccount =
- mTelecomManager.getUserSelectedOutgoingPhoneAccount();
- ComponentName telephonyComponentName =
- new ComponentName(mContext, TelephonyConnectionService.class);
-
- if (defaultPhoneAccount != null &&
- telephonyComponentName.equals(defaultPhoneAccount.getComponentName()) &&
- !hasAccountEntryForPhoneAccount(defaultPhoneAccount)) {
-
- String phoneAccountId = defaultPhoneAccount.getId();
- if (!TextUtils.isEmpty(phoneAccountId) && TextUtils.isDigitsOnly(phoneAccountId)) {
- PhoneAccountHandle upgradedPhoneAccount =
- PhoneUtils.makePstnPhoneAccountHandle(
- PhoneGlobals.getPhone(Integer.parseInt(phoneAccountId)));
-
- if (hasAccountEntryForPhoneAccount(upgradedPhoneAccount)) {
- mTelecomManager.setUserSelectedOutgoingPhoneAccount(upgradedPhoneAccount);
- }
- }
- }
}
private void tearDownAccounts() {