android系统使用Camera2 应用

系统默认的配置是Camera2应用没有显示在桌面的

根据freescaleandroid5.1/packages/apps/Camera2/Android.mk文件内容

ifeq ($(HAVE_FSL_IMX_GPU3D),true)

ifeq ($(BOARD_HAVE_VPU),true)

LOCAL_PATH:= $(call my-dir)



include $(CLEAR_VARS)



LOCAL_MODULE_TAGS := optional



LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13

LOCAL_STATIC_JAVA_LIBRARIES += android-ex-camera2-portability

LOCAL_STATIC_JAVA_LIBRARIES += xmp_toolkit

LOCAL_STATIC_JAVA_LIBRARIES += glide



LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_SRC_FILES += $(call all-java-files-under, src_pd)

LOCAL_SRC_FILES += $(call all-java-files-under, src_pd_gcam)



LOCAL_RESOURCE_DIR += \

    $(LOCAL_PATH)/res \

    $(LOCAL_PATH)/res_p





include $(LOCAL_PATH)/version.mk

LOCAL_AAPT_FLAGS := \

        --auto-add-overlay \

        --version-name "$(version_name_package)" \

        --version-code $(version_code_package) \



LOCAL_PACKAGE_NAME := Camera2



LOCAL_SDK_VERSION := current



LOCAL_PROGUARD_FLAG_FILES := proguard.flags



LOCAL_JNI_SHARED_LIBRARIES := libjni_tinyplanet libjni_jpegutil



include $(BUILD_PACKAGE)



include $(call all-makefiles-under, $(LOCAL_PATH))

endif

endif



需要时能HAVE_FSL_IMX_GPU3D和BOARD_HAVE_VPU

所以,在freescaleandroid5.1/device/fsl/sabresd_6dq/BoardConfig.mk文件中添加如下配置

# add for carmera2

HAVE_FSL_IMX_GPU3D := true

BOARD_HAVE_VPU := true



删掉freescaleandroid5.1/out/target/product/sabresd_6dq/system/app/Camera2文件夹;重新编译,替换卡中的uramdisk.img文件即可









你可能感兴趣的:(android)