Merge "Initial removal of some dead code in Telephony" into lmp-mr1-dev
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index b337622..bbd65cc 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -256,7 +256,9 @@
                 new ComponentName(phone.getContext(), TelephonyConnectionService.class);
         // TODO: Should use some sort of special hidden flag to decorate this account as
         // an emergency-only account
-        String id = isEmergency ? "E" : prefix + String.valueOf(phone.getSubId());
+        TelecomManager telecomManager = TelecomManager.from(phone.getContext());
+        String id = isEmergency ?
+            "E" : prefix + telecomManager.getPhoneAccountIdForSubscriptionId(phone.getSubId());
         return new PhoneAccountHandle(pstnConnectionServiceName, id);
     }