android.carrierapi.cts.CarrierApiTest#testAddSubscriptionToExistingGroupForMultipleSims fail
Posted Mrsongs的心情杂货铺
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android.carrierapi.cts.CarrierApiTest#testAddSubscriptionToExistingGroupForMultipleSims fail相关的知识,希望对你有一定的参考价值。
[DESCRIPTION]
双卡项目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)
[SOLUTION]
需要插入两张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
以上是关于android.carrierapi.cts.CarrierApiTest#testAddSubscriptionToExistingGroupForMultipleSims fail的主要内容,如果未能解决你的问题,请参考以下文章