From 424daa6932dd4b278a7e8e45520a520d867b12ff Mon Sep 17 00:00:00 2001 From: Roger Liao Date: Fri, 15 Jul 2022 15:58:53 +0800 Subject: [PATCH] Scale the flexibility for camera flash/autofocus settings Let clients determine the configuration of camera flash/autofocus features. Copy the rule by conditions: - android.hardware.camera.xml for a non auto-focus camera. - android.hardware.camera.flash-autofocus.xml for an auto-focus camera. Bug: 239142680 Test: adb shell pm list features Change-Id: I82fc7284743453712b6468efbb348c25b8c2ca88 --- device.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index a708664b..c94a8902 100644 --- a/device.mk +++ b/device.mk @@ -572,8 +572,16 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml +# (See b/239142680, b/211840489, b/225749853) +ifneq ($(DISABLE_CAMERA_FS_AF),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.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml +endif + 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\