Clean up public API of SubInfoRecord.

bug: 17575308
Change-Id: I5fad0008ef57188d6b13ebbf4b6ce304b0e67fce
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index b6a4498..f598daf 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -773,7 +773,7 @@
         boolean isValid = false;
         List<SubInfoRecord> slist = SubscriptionManager.getActiveSubInfoList();
         for (SubInfoRecord subInfoRecord : slist) {
-            if (subInfoRecord.subId == subId) {
+            if (subInfoRecord.getSubscriptionId() == subId) {
                 isValid = true;
                 break;
             }
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index 5f5a32e..b3b1d80 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -291,11 +291,10 @@
     }
 
     private void initAccountList() {
-        List<SubInfoRecord> subscriptions = SubscriptionManager.getActiveSubInfoList();
-        for (int i = 0; i < subscriptions.size(); i++) {
-            String label = subscriptions.get(i).getLabel();
+        for (SubInfoRecord subscription : SubscriptionManager.getActiveSubInfoList()) {
+            String label = subscription.getDisplayName().toString();
             Intent intent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS);
-            intent.putExtra(CallFeaturesSetting.SUB_ID_EXTRA, subscriptions.get(i).subId);
+            intent.putExtra(CallFeaturesSetting.SUB_ID_EXTRA, subscription.getSubscriptionId());
             intent.putExtra(CallFeaturesSetting.SUB_LABEL_EXTRA, label);
 
             Preference accountPreference = new Preference(mApplicationContext);
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index ef63068..ad74ca4 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -131,8 +131,8 @@
                 // slotId from the subId or the phoneId in all instances.
                 SubInfoRecord record = SubscriptionManager.getSubInfoForSubscriber(subId);
                 if (record != null) {
-                    subDisplayName = record.displayName;
-                    slotId = record.slotId;
+                    subDisplayName = record.getDisplayName().toString();
+                    slotId = record.getSubscriptionId();
 
                     // Assign a "fake" color while the underlying Telephony stuff is refactored.
                     color = makeFakeColor(subId);