Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b086fed6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix crash issue when NetworkSelectSettings UI goes OFF and then ON"

parents be4a0e84 492e9857
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -343,16 +343,6 @@ public class NetworkSelectSettings extends DashboardFragment {
                    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
        NetworkOperatorPreference connectedPref = null;
        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;
    }