Mark all SIM accounts as enabled.

Since there is no way to disable a SIM account, make sure that on
upgrade from Lollipop, all SIM accounts are enabled.

Bug: 21674348
Change-Id: Ic649a6a748fcf768c7cfce5feb6e339d532e0e19
diff --git a/src/com/android/server/telecom/PhoneAccountRegistrar.java b/src/com/android/server/telecom/PhoneAccountRegistrar.java
index 83f1207..ee218d7 100644
--- a/src/com/android/server/telecom/PhoneAccountRegistrar.java
+++ b/src/com/android/server/telecom/PhoneAccountRegistrar.java
@@ -117,7 +117,7 @@
 
     private static final String FILE_NAME = "phone-account-registrar-state.xml";
     @VisibleForTesting
-    public static final int EXPECTED_STATE_VERSION = 6;
+    public static final int EXPECTED_STATE_VERSION = 7;
 
     /** Keep in sync with the same in SipSettings.java */
     private static final String SIP_SHARED_PREFERENCES = "SIP_PREFERENCES";
@@ -1203,6 +1203,8 @@
                     }
                 }
 
+                ComponentName pstnComponentName = new ComponentName("com.android.phone",
+                        "com.android.services.telephony.TelephonyConnectionService");
                 ComponentName sipComponentName = new ComponentName("com.android.phone",
                         "com.android.services.telephony.sip.SipConnectionService");
 
@@ -1237,6 +1239,12 @@
                         enabled = true;
                     }
                 }
+                if (version < 7) {
+                    // Always enabled all PSTN acocunts on upgrade to version 7
+                    if (accountHandle.getComponentName().equals(pstnComponentName)) {
+                        enabled = true;
+                    }
+                }
 
                 PhoneAccount.Builder builder = PhoneAccount.builder(accountHandle, label)
                         .setAddress(address)