OOBE: fix NPE in choose data sim page

Change-Id: Ib6228e7cd223d29ac48200e9a50c0900d35f8a4e
This commit is contained in:
emancebo 2015-05-15 15:09:58 -07:00 committed by Ed Mancebo
parent 3d884cef0e
commit b2ceb1f8bb

View File

@ -122,7 +122,8 @@ public class ChooseDataSimPage extends SetupPage {
mPageView = (ViewGroup)mRootView.findViewById(R.id.page_view); mPageView = (ViewGroup)mRootView.findViewById(R.id.page_view);
mProgressBar = (ProgressBar) mRootView.findViewById(R.id.progress); mProgressBar = (ProgressBar) mRootView.findViewById(R.id.progress);
List<SubscriptionInfo> subInfoRecords = mSubscriptionManager.getActiveSubscriptionInfoList(); List<SubscriptionInfo> subInfoRecords = mSubscriptionManager.getActiveSubscriptionInfoList();
int simCount = subInfoRecords.size(); int simCount =
subInfoRecords != null ? subInfoRecords.size() : 0;
mSubInfoRecords = new SparseArray<SubscriptionInfo>(simCount); mSubInfoRecords = new SparseArray<SubscriptionInfo>(simCount);
for (SubscriptionInfo subInfoRecord : subInfoRecords) { for (SubscriptionInfo subInfoRecord : subInfoRecords) {
mSubInfoRecords.put(subInfoRecord.getSimSlotIndex(), subInfoRecord); mSubInfoRecords.put(subInfoRecord.getSimSlotIndex(), subInfoRecord);