diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2015-04-18 11:48:46 +0700 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-04-20 15:55:30 -0700 |
commit | cfc4a0db6455d8d9429962b10de00ee02efacaee (patch) | |
tree | d699cee5cedf3a6d66493e9b6f98ff9084ea2887 /src/com/cyanogenmod/setupwizard/setup | |
parent | dd500a1f42e65043595840c173cd5a4763f6099d (diff) | |
download | packages_apps_SetupWizard-cfc4a0db6455d8d9429962b10de00ee02efacaee.zip packages_apps_SetupWizard-cfc4a0db6455d8d9429962b10de00ee02efacaee.tar.gz packages_apps_SetupWizard-cfc4a0db6455d8d9429962b10de00ee02efacaee.tar.bz2 |
SetupWizard: handle skipping id in SubInfoRecords
This extends I3b4132afccc96a5d08986a3cb902bd384931f21f to actually
work.
Change-Id: I9183626b40edda6a96888dca2816ff116b64bc5e
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java index e9e71ec..451b79e 100644 --- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java @@ -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()); } |