From bef0cb7c8d784a27cfdb073dfafaeb8469b0e03e Mon Sep 17 00:00:00 2001 From: Boon Jun Date: Fri, 5 Jul 2024 02:30:52 +0000 Subject: [PATCH] Allow camera configurations with no flash light Let clients determine the configuration of camera flash features. Copy the rule by conditions: - android.hardware.camera.autofocus.xml for devices with no flash - android.hardware.camera.flash-autofocus.xml for devices with flash Bug: 350371742 Test: adb shell pm list features Flag: EXEMPT build file change Change-Id: If4c9b73f2ca934374c4870db3954702f3522b9a0 --- device.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 786c441..2e3554f 100644 --- a/device.mk +++ b/device.mk @@ -753,12 +753,19 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \ frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml\ frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml\ +ifneq ($(DISABLE_CAMERA_FS),true) +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml +else +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml +endif + #PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \