【CTS】CtsAppTestCases -t android.app.cts.SystemFeaturesTest#testCameraFeatures

[DESCRIPTION]
这个会测试Device的一些feature,不同的device可能会配置不同的feature,比如flash,focus等项目,因此需要根据实际情况去配置

常见fail log的形式:
junit.framework.AssertionFailedError: PackageManager#hasSystemFeature should NOT return true for android.hardware.camera.xxxx
如:
junit.framework.AssertionFailedError: PackageManager#hasSystemFeature should NOT return true for android.hardware.camera.capability.raw

[SOLUTION]

  1. 这些feature项的配置有两个地方:
    a./frameworks/native/data/etc/xxxx.xml //xxxx表示不同feature name
    b./device/mediatekprojects/xxxx/ //xxxx表示当前project

  2. 在1中的两个路径下,找到对应的feature所在的xml文件,添加或删除对应的语句即可

  3. 此题解法:
    a. 删除 /frameworks/native/data/etc/android.hardware.camera.raw.xml 中的
    b. 删除 /device/mediatekprojects/xxxx/ 下android.hardware.camera.xml 中的

你可能感兴趣的:(Android)