Merge "Fix crash issue when NetworkSelectSettings UI goes OFF and then ON"
This commit is contained in:
@@ -343,16 +343,6 @@ public class NetworkSelectSettings extends DashboardFragment {
|
|||||||
mPreferenceCategory.getPreference(numberOfPreferences));
|
mPreferenceCategory.getPreference(numberOfPreferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
// update selected preference instance by index
|
|
||||||
for (int index = 0; index < mCellInfoList.size(); index++) {
|
|
||||||
final CellInfo cellInfo = mCellInfoList.get(index);
|
|
||||||
|
|
||||||
if ((mSelectedPreference != null) && mSelectedPreference.isSameCell(cellInfo)) {
|
|
||||||
mSelectedPreference = (NetworkOperatorPreference)
|
|
||||||
(mPreferenceCategory.getPreference(index));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// update the content of preference
|
// update the content of preference
|
||||||
NetworkOperatorPreference connectedPref = null;
|
NetworkOperatorPreference connectedPref = null;
|
||||||
for (int index = 0; index < mCellInfoList.size(); index++) {
|
for (int index = 0; index < mCellInfoList.size(); index++) {
|
||||||
@@ -386,6 +376,16 @@ public class NetworkSelectSettings extends DashboardFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update selected preference instance by index
|
||||||
|
for (int index = 0; index < mCellInfoList.size(); index++) {
|
||||||
|
final CellInfo cellInfo = mCellInfoList.get(index);
|
||||||
|
|
||||||
|
if ((mSelectedPreference != null) && mSelectedPreference.isSameCell(cellInfo)) {
|
||||||
|
mSelectedPreference = (NetworkOperatorPreference)
|
||||||
|
(mPreferenceCategory.getPreference(index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return connectedPref;
|
return connectedPref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user