Merge "Add null check for forbiddenPlmns"

This commit is contained in:
Lei Yu
2019-03-05 18:05:34 +00:00
committed by Android (Google) Code Review
2 changed files with 21 additions and 1 deletions

View File

@@ -102,4 +102,12 @@ public class NetworkSelectSettingsTest {
(NetworkOperatorPreference) mPreferenceCategory.getPreference(0);
assertThat(preference.getCellInfo()).isEqualTo(mCellInfo2);
}
@Test
public void updateForbiddenPlmns_forbiddenPlmnsNull_shouldNotCrash() {
when(mTelephonyManager.getForbiddenPlmns()).thenReturn(null);
// Should not Crash
mNetworkSelectSettings.updateForbiddenPlmns();
}
}