Merge "Add null check for CarrierConfig"

This commit is contained in:
TreeHugger Robot
2019-02-15 03:41:25 +00:00
committed by Android (Google) Code Review
4 changed files with 19 additions and 5 deletions

View File

@@ -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);
}
}