diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 08de3b7..a625b47 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -88,7 +88,7 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.preference.Preference;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -267,7 +267,7 @@
     private MenuItem mMenuSimCards;
     private MenuItem mMenuCellularNetworks;
 
-    private List<SubInfoRecord> mSubInfoList;
+    private List<SubscriptionInfo> mSubInfoList;
     private Map<Integer,String> mMobileTagMap;
 
     /** Flag used to ignore listeners during binding. */
@@ -1130,8 +1130,8 @@
     };
 
     private void handleMultiSimDataDialog() {
-        final SubInfoRecord currentSir = getCurrentTabSubInfo(getActivity());
-        final SubInfoRecord nextSir = SubscriptionManager.getSubInfoForSubscriber(
+        final SubscriptionInfo currentSir = getCurrentTabSubInfo(getActivity());
+        final SubscriptionInfo nextSir = SubscriptionManager.getSubscriptionInfoForSubscriber(
                 SubscriptionManager.getDefaultDataSubId());
 
         if (currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
@@ -2339,14 +2339,14 @@
         final ConnectivityManager conn = ConnectivityManager.from(context);
         final TelephonyManager tele = TelephonyManager.from(context);
 
-        final List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
+        final List<SubscriptionInfo> subInfoList = SubscriptionManager.getActiveSubscriptionInfoList();
         // No activated Subscription
         if (subInfoList == null) {
             return false;
         }
         // require both supported network and ready SIM
         boolean isReady = true;
-        for (SubInfoRecord subInfo : subInfoList) {
+        for (SubscriptionInfo subInfo : subInfoList) {
             isReady = isReady & tele.getSimState(subInfo.getSimSlotIndex()) == SIM_STATE_READY;
         }
         return conn.isNetworkSupported(TYPE_MOBILE) && isReady;
@@ -2585,9 +2585,9 @@
             }
         };
 
-        private void addMobileTab(Context context, List<SubInfoRecord> subInfoList) {
+        private void addMobileTab(Context context, List<SubscriptionInfo> subInfoList) {
             if (subInfoList != null) {
-                for (SubInfoRecord subInfo : mSubInfoList) {
+                for (SubscriptionInfo subInfo : mSubInfoList) {
                     if (hasReadyMobileRadio(context, subInfo.getSubscriptionId())) {
                         mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
                                 subInfo.getDisplayName()));
@@ -2596,11 +2596,11 @@
             }
         }
 
-        private SubInfoRecord getCurrentTabSubInfo(Context context) {
+        private SubscriptionInfo getCurrentTabSubInfo(Context context) {
             if (mSubInfoList != null && mTabHost != null) {
                 final int currentTagIndex = mTabHost.getCurrentTab();
                 int i = 0;
-                for (SubInfoRecord subInfo : mSubInfoList) {
+                for (SubscriptionInfo subInfo : mSubInfoList) {
                     if (hasReadyMobileRadio(context, subInfo.getSubscriptionId())) {
                         if (i++ == currentTagIndex) {
                             return subInfo;
@@ -2616,12 +2616,12 @@
          * @param subInfoList The subscription Info List
          * @return The map or null if no activated subscription
          */
-        private Map<Integer, String> initMobileTabTag(List<SubInfoRecord> subInfoList) {
+        private Map<Integer, String> initMobileTabTag(List<SubscriptionInfo> subInfoList) {
             Map<Integer, String> map = null;
             if (subInfoList != null) {
                 String mobileTag;
                 map = new HashMap<Integer, String>();
-                for (SubInfoRecord subInfo : subInfoList) {
+                for (SubscriptionInfo subInfo : subInfoList) {
                     mobileTag = TAB_MOBILE + String.valueOf(subInfo.getSubscriptionId());
                     map.put(subInfo.getSubscriptionId(), mobileTag);
                 }
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index aa27e3b..0e83313 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -44,7 +44,7 @@
 import android.service.trust.TrustAgentService;
 import android.telephony.TelephonyManager;
 import android.telephony.SubscriptionManager;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -371,9 +371,9 @@
      */
     private static boolean isSimReady() {
         int simState = TelephonyManager.SIM_STATE_UNKNOWN;
-        final List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
+        final List<SubscriptionInfo> subInfoList = SubscriptionManager.getActiveSubscriptionInfoList();
         if (subInfoList != null) {
-            for (SubInfoRecord subInfo : subInfoList) {
+            for (SubscriptionInfo subInfo : subInfoList) {
                 simState = TelephonyManager.getDefault().getSimState(subInfo.getSimSlotIndex());
                 if((simState != TelephonyManager.SIM_STATE_ABSENT) &&
                             (simState != TelephonyManager.SIM_STATE_UNKNOWN)){
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index e150d75..e687beb 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -60,7 +60,7 @@
 import android.provider.ContactsContract.Profile;
 import android.provider.ContactsContract.RawContacts;
 import android.service.persistentdata.PersistentDataBlockManager;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -988,12 +988,13 @@
      * finds a record with subId.
      * Since the number of SIMs are few, an array is fine.
      */
-    public static SubInfoRecord findRecordBySubId(final int subId) {
-        final List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
+    public static SubscriptionInfo findRecordBySubId(final int subId) {
+        final List<SubscriptionInfo> subInfoList =
+                SubscriptionManager.getActiveSubscriptionInfoList();
         final int subInfoLength = subInfoList.size();
 
         for (int i = 0; i < subInfoLength; ++i) {
-            final SubInfoRecord sir = subInfoList.get(i);
+            final SubscriptionInfo sir = subInfoList.get(i);
             if (sir != null && sir.getSubscriptionId() == subId) {
                 return sir;
             }
@@ -1006,12 +1007,13 @@
      * finds a record with slotId.
      * Since the number of SIMs are few, an array is fine.
      */
-    public static SubInfoRecord findRecordBySlotId(final int slotId) {
-        final List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
+    public static SubscriptionInfo findRecordBySlotId(final int slotId) {
+        final List<SubscriptionInfo> subInfoList =
+                SubscriptionManager.getActiveSubscriptionInfoList();
         final int subInfoLength = subInfoList.size();
 
         for (int i = 0; i < subInfoLength; ++i) {
-            final SubInfoRecord sir = subInfoList.get(i);
+            final SubscriptionInfo sir = subInfoList.get(i);
             if (sir.getSimSlotIndex() == slotId) {
                 //Right now we take the first subscription on a SIM.
                 return sir;
diff --git a/src/com/android/settings/deviceinfo/ImeiInformation.java b/src/com/android/settings/deviceinfo/ImeiInformation.java
index 4a3cef3..921ef8e 100644
--- a/src/com/android/settings/deviceinfo/ImeiInformation.java
+++ b/src/com/android/settings/deviceinfo/ImeiInformation.java
@@ -24,7 +24,7 @@
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceScreen;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -101,7 +101,7 @@
     }
 
     private Phone getPhoneFromSlotId(int slotId) {
-        final List<SubInfoRecord> subInfos = SubscriptionManager.getSubInfoUsingSlotId(slotId);
+        final List<SubscriptionInfo> subInfos = SubscriptionManager.getSubscriptionInfoUsingSlotId(slotId);
 
         if (subInfos == null || subInfos.size() < 1) {
             return null;
diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java
index f4b5887..a371868 100644
--- a/src/com/android/settings/sim/SimSettings.java
+++ b/src/com/android/settings/sim/SimSettings.java
@@ -29,7 +29,7 @@
 import android.preference.PreferenceScreen;
 import android.provider.SearchIndexableResource;
 import android.provider.Telephony;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.telephony.PhoneNumberUtils;
@@ -104,13 +104,13 @@
      * mSubInfoList is the list of all SubInfos.
      * mSelectableSubInfos is the list of SubInfos that a user can select for data, calls, and SMS.
      */
-    private List<SubInfoRecord> mAvailableSubInfos = null;
-    private List<SubInfoRecord> mSubInfoList = null;
-    private List<SubInfoRecord> mSelectableSubInfos = null;
+    private List<SubscriptionInfo> mAvailableSubInfos = null;
+    private List<SubscriptionInfo> mSubInfoList = null;
+    private List<SubscriptionInfo> mSelectableSubInfos = null;
 
-    private SubInfoRecord mCellularData = null;
-    private SubInfoRecord mCalls = null;
-    private SubInfoRecord mSMS = null;
+    private SubscriptionInfo mCellularData = null;
+    private SubscriptionInfo mCalls = null;
+    private SubscriptionInfo mSMS = null;
 
     private PreferenceCategory mSimCards = null;
 
@@ -125,7 +125,7 @@
         super.onCreate(bundle);
 
         if (mSubInfoList == null) {
-            mSubInfoList = SubscriptionManager.getActiveSubInfoList();
+            mSubInfoList = SubscriptionManager.getActiveSubscriptionInfoList();
         }
 
         createPreferences();
@@ -141,11 +141,11 @@
         mSimCards = (PreferenceCategory)findPreference(SIM_CARD_CATEGORY);
 
         final int numSlots = tm.getSimCount();
-        mAvailableSubInfos = new ArrayList<SubInfoRecord>(numSlots);
-        mSelectableSubInfos = new ArrayList<SubInfoRecord>();
+        mAvailableSubInfos = new ArrayList<SubscriptionInfo>(numSlots);
+        mSelectableSubInfos = new ArrayList<SubscriptionInfo>();
         mNumSims = 0;
         for (int i = 0; i < numSlots; ++i) {
-            final SubInfoRecord sir = Utils.findRecordBySlotId(i);
+            final SubscriptionInfo sir = Utils.findRecordBySlotId(i);
             mSimCards.addPreference(new SimPreference(getActivity(), sir, i));
             mAvailableSubInfos.add(sir);
             if (sir != null) {
@@ -163,9 +163,9 @@
         final int numSlots = tm.getSimCount();
 
         mNumSims = 0;
-        mAvailableSubInfos = new ArrayList<SubInfoRecord>(numSlots);
+        mAvailableSubInfos = new ArrayList<SubscriptionInfo>(numSlots);
         for (int i = 0; i < numSlots; ++i) {
-            final SubInfoRecord sir = Utils.findRecordBySlotId(i);
+            final SubscriptionInfo sir = Utils.findRecordBySlotId(i);
             mAvailableSubInfos.add(sir);
             if (sir != null) {
                 mNumSims++;
@@ -179,7 +179,7 @@
     }
 
     private void updateSimSlotValues() {
-        SubscriptionManager.getAllSubInfoList();
+        SubscriptionManager.getAllSubscriptionInfoList();
 
         final int prefSize = mSimCards.getPreferenceCount();
         for (int i = 0; i < prefSize; ++i) {
@@ -198,7 +198,7 @@
 
     private void updateSmsValues() {
         final Preference simPref = findPreference(KEY_SMS);
-        final SubInfoRecord sir = Utils.findRecordBySubId(SubscriptionManager.getDefaultSmsSubId());
+        final SubscriptionInfo sir = Utils.findRecordBySubId(SubscriptionManager.getDefaultSmsSubId());
         simPref.setTitle(R.string.sms_messages_title);
         if (mSubInfoList.size() == 1) {
             simPref.setSummary(mSubInfoList.get(0).getDisplayName());
@@ -212,7 +212,7 @@
 
     private void updateCellularDataValues() {
         final Preference simPref = findPreference(KEY_CELLULAR_DATA);
-        final SubInfoRecord sir = Utils.findRecordBySubId(SubscriptionManager.getDefaultDataSubId());
+        final SubscriptionInfo sir = Utils.findRecordBySubId(SubscriptionManager.getDefaultDataSubId());
         simPref.setTitle(R.string.cellular_data_title);
         if (mSubInfoList.size() == 1) {
             simPref.setSummary(mSubInfoList.get(0).getDisplayName());
@@ -240,7 +240,7 @@
     public void onResume() {
         super.onResume();
 
-        mSubInfoList = SubscriptionManager.getActiveSubInfoList();
+        mSubInfoList = SubscriptionManager.getActiveSubscriptionInfoList();
         updateAvailableSubInfos();
         updateAllOptions();
     }
@@ -271,7 +271,7 @@
                     @Override
                     public void onClick(DialogInterface dialog, int value) {
 
-                        final SubInfoRecord sir;
+                        final SubscriptionInfo sir;
 
                         if (id == DATA_PICK) {
                             sir = mSelectableSubInfos.get(value);
@@ -305,7 +305,7 @@
             }
         } else {
             for (int i = 0; i < selectableSubInfoLength; ++i) {
-                final SubInfoRecord sir = mSelectableSubInfos.get(i);
+                final SubscriptionInfo sir = mSelectableSubInfos.get(i);
                 CharSequence displayName = sir.getDisplayName();
                 if (displayName == null) {
                     displayName = "";
@@ -379,7 +379,7 @@
         }
     }
 
-    private void setActivity(Preference preference, SubInfoRecord sir) {
+    private void setActivity(Preference preference, SubscriptionInfo sir) {
         final String key = preference.getKey();
 
         if (key.equals(KEY_CELLULAR_DATA)) {
@@ -394,11 +394,11 @@
     }
 
     private class SimPreference extends Preference{
-        private SubInfoRecord mSubInfoRecord;
+        private SubscriptionInfo mSubInfoRecord;
         private int mSlotId;
         private int[] tintArr;
 
-        public SimPreference(Context context, SubInfoRecord subInfoRecord, int slotId) {
+        public SimPreference(Context context, SubscriptionInfo subInfoRecord, int slotId) {
             super(context);
 
             mSubInfoRecord = subInfoRecord;
@@ -438,7 +438,7 @@
             }
         }
 
-        public SubInfoRecord getSubInfoRecord() {
+        public SubscriptionInfo getSubInfoRecord() {
             return mSubInfoRecord;
         }
 
@@ -528,13 +528,13 @@
      * @param context The Context
      * @return Sorted Subscription List or NULL if no activated Subscription
      */
-    public static List<SubInfoRecord> getSortedSubInfoList(Context context) {
-        List<SubInfoRecord> infoList = SubscriptionManager.getActiveSubInfoList();
+    public static List<SubscriptionInfo> getSortedSubInfoList(Context context) {
+        List<SubscriptionInfo> infoList = SubscriptionManager.getActiveSubscriptionInfoList();
         if (infoList != null) {
-            Collections.sort(infoList, new Comparator<SubInfoRecord>() {
+            Collections.sort(infoList, new Comparator<SubscriptionInfo>() {
 
                 @Override
-                public int compare(SubInfoRecord arg0, SubInfoRecord arg1) {
+                public int compare(SubscriptionInfo arg0, SubscriptionInfo arg1) {
                     int flag = arg0.getSimSlotIndex() - arg1.getSimSlotIndex();
                     if (flag == 0) {
                         return arg0.getSubscriptionId() - arg1.getSubscriptionId();
