一个xml引起的三方Camera应用不能使用问题

前端之家收集整理的这篇文章主要介绍了一个xml引起的三方Camera应用不能使用问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

一、问题

目前遇到skype应用在Android系统中不能使用Camera问题;从log中看没有任何异常,只是该应用在调用完getCameraInfo后没有在open,也没有startPreview。

二、解决

之前在CameraAPI中添加打印,自始至终没有看到open调用;反编译skype.apk,由于信息不全、代码量太大,也没有头绪。

反编译工具

后通过添加

system/etc/permissions/android.hardware.camera.front.xml

system/etc/permissions/android.hardware.camera.xml

问题解决,后边在研究。

三、源码位置

frameworks/native/data/etc/android.hardware.camera.front.xml

frameworks/native/data/etc/android.hardware.camera.xml

预编译位置:

device/xxx/xxx6/xxx.mk

PRODUCT_COPY_FILES += \
        $(PREBUILTS_CONFIGS_PATH)/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \
        frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
        frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
        frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \
        frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
        frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
        frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
        packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:system/etc/permissions/android.software.live_wallpaper.xml
原文链接:https://www.f2er.com/xml/298039.html

猜你在找的XML相关文章