Fix crash issue when NetworkSelectSettings UI goes OFF and then ON
When updating selected preference instance by index, since
mPreferenceCategory hasn't been updated yet, and then there is a
possibility that the index is over the size of preference, so this
would result to Settings crash because IndexOutOfBoundsException
was detected in NetworkSelectSettings.
After updating the network preferences of mPreferenceCategory, update
the selected preference.
Test: manual - Checked that crash does not occur when
NetworkSelectSettings UI goes OFF and then ON.
Test: auto - Passed NetworkSelectSettingsTest.
1 file changed