Merge "Add null check for CarrierConfig"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2f6de9967b
@@ -111,4 +111,12 @@ public class AutoSelectPreferenceControllerTest {
|
||||
mContext.getString(R.string.manual_mode_disallowed_summary,
|
||||
mTelephonyManager.getSimOperatorName()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void init_carrierConfigNull_shouldNotCrash() {
|
||||
when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(null);
|
||||
|
||||
// Should not crash
|
||||
mController.init(SUB_ID);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user