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
(仅供参考,希望有用)
改的方式同上!!!只是路径不一样