SetupWizard: handle skipping id in SubInfoRecords
This extends I3b4132afccc96a5d08986a3cb902bd384931f21f to actually work. Change-Id: I9183626b40edda6a96888dca2816ff116b64bc5e
This commit is contained in:
parent
dd500a1f42
commit
cfc4a0db64
@ -138,13 +138,14 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
for (int i = 0; i < simCount; i++) {
|
||||
View simRow = inflater.inflate(R.layout.data_sim_row, null);
|
||||
mPageView.addView(simRow);
|
||||
SubscriptionInfo subInfoRecord = mSubInfoRecords.get(i);
|
||||
SubscriptionInfo subInfoRecord = mSubInfoRecords.valueAt(i);
|
||||
simRow.setTag(subInfoRecord);
|
||||
simRow.setOnClickListener(mSetDataSimClickListener);
|
||||
mNameViews.put(i, (TextView) simRow.findViewById(R.id.sim_title));
|
||||
mSignalViews.put(i, (ImageView) simRow.findViewById(R.id.signal));
|
||||
mCheckBoxes.put(i, (CheckBox) simRow.findViewById(R.id.enable_check));
|
||||
mPhoneStateListeners.put(i, createPhoneStateListener(subInfoRecord));
|
||||
int slot = subInfoRecord.getSimSlotIndex();
|
||||
mNameViews.put(slot, (TextView) simRow.findViewById(R.id.sim_title));
|
||||
mSignalViews.put(slot, (ImageView) simRow.findViewById(R.id.signal));
|
||||
mCheckBoxes.put(slot, (CheckBox) simRow.findViewById(R.id.enable_check));
|
||||
mPhoneStateListeners.put(slot, createPhoneStateListener(subInfoRecord));
|
||||
mPageView.addView(inflater.inflate(R.layout.divider, null));
|
||||
}
|
||||
updateSignalStrengths();
|
||||
@ -228,7 +229,7 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
private void updateSignalStrengths() {
|
||||
if (mIsAttached) {
|
||||
for (int i = 0; i < mSubInfoRecords.size(); i++) {
|
||||
updateSignalStrength(mSubInfoRecords.get(i));
|
||||
updateSignalStrength(mSubInfoRecords.valueAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -252,7 +253,7 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
private void updateCurrentDataSub() {
|
||||
if (mIsAttached) {
|
||||
for (int i = 0; i < mSubInfoRecords.size(); i++) {
|
||||
SubscriptionInfo subInfoRecord = mSubInfoRecords.get(i);
|
||||
SubscriptionInfo subInfoRecord = mSubInfoRecords.valueAt(i);
|
||||
mCheckBoxes.get(i).setChecked(mSubscriptionManager.getDefaultDataPhoneId()
|
||||
== subInfoRecord.getSimSlotIndex());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user