问题描述
双卡项目android.carrierapi.cts.CarrierApiTest#testAddSubscriptionToExistingGroupForMultipleSims 测试fail:
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:48)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertTrue(Assert.java:27)
at android.carrierapi.cts.CarrierApiTest.testAddSubscriptionToExistingGroupForMultipleSims(CarrierApiTest.java:970)
解决方案
需要插入两张iccId不同的UICC白卡测试,而且测试前需要检查双卡设置,确保默认有选到其中一张SIM,否则
info为null也会导致测试failed.
cts/tests/tests/carrierapi/src/android/carrierapi/cts/CarrierApiTest.java
int subId = SubscriptionManager.getDefaultDataSubscriptionId();
SubscriptionInfo info = mSubscriptionManager.getActiveSubscriptionInfo(subId);//如果不手动选择默认白卡,info会为null