CTS-testAccountManagement

这篇博客探讨了在CTS测试中com.android.cts.devicepolicy.MixedProfileOwnerTest的testAccountManagement问题,原因在于'android.intent.action.USER_STOPPING'广播处理延迟。解决方案是将该广播加入到CTS广播队列,具体实现涉及修改frameworksasecore es esvaluesconfig_ex.xml文件。对于MTK平台,修改路径位于..frameworksaseservicescorejavacomandroidserverActivityManagerService.java。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CTS测试
com.android.cts.devicepolicy.MixedProfileOwnerTest
– testAccountManagement

FAIL:
com.android.tradefed.device.DeviceUnresponsiveException: Attempted shell am stop-user -w 10 multiple times on device 0123456789ABCDEF without communication success. Aborting. at com.android.tradefed.device.TestDevice.performDeviceAction(TestDevice.java:1653) 

原因分析:“android.intent.action.USER_STOPPING广播处理速度慢

解决方法:
frameworks\base\core\res\res\values\config_ex.xml中,把android.intent.action.USER_STOPPING和android.intent.action.ACTION_SHUTDOWN加入到CTS广播队列

      <item>android.intent.action.EVENT_REMINDER</item>//这个是处理testReminder失败的,如果没遇到可以不加。
        <item>android.intent.action.VOICE_TESTAPP</item> 
        <item>com.android.cts.deviceowner.INTENT_PACKAGE_INSTALL_COMMIT</item> 
+       <item>android.intent.action.USER_STOPPING</item>
+       <item>android.intent.action.ACTION_SHUTDOWN</item>
     </string-array>
 </resources>

MTK的路径是:
..\frameworks\base\services\core\java\com\android\server\ActivityManagerService.java
(仅供参考,希望有用)
改的方式同上!!!只是路径不一样

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值