diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2022-12-22 01:02:18 +0200 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2024-01-04 05:40:50 +0800 |
commit | a6005853b38184f930b2367a70a211d5e6edc9e9 (patch) | |
tree | b23062350af4301ac55dfef0a7a8728947195155 | |
parent | 9b92d52f5469202da702e20cfd85f3226bc4a2e9 (diff) |
pantah: overlay: Configure aux cameras for Aperture
Change-Id: I3d1c93057b5c2a1ba09c06a945d538d2043f30fd
3 files changed, 64 insertions, 1 deletions
diff --git a/cheetah/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml b/cheetah/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml new file mode 100644 index 0000000..6146873 --- /dev/null +++ b/cheetah/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + SPDX-FileCopyrightText: 2022 The LineageOS Project + SPDX-License-Identifier: Apache-2.0 +--> +<resources> + <!-- An array of triplets made of (camera ID, approximate zoom ratio, exact zoom ratio). + These values will be added to the lens selector if one or more cameras uses the + multi-camera API to let the user select which lens to use. + It's highly recommended to leave config_enableAuxCameras to false, since with + multi-camera API you only use a single camera device for all sensors. + You may enable it if you need auxiliary camera devices for a set of cameras on one + of the device's side (e.g. logical main back camera but multiple physical camera + devices on front), in that case if a main device side's lens is referenced here + all the auxiliary camera devices of that side will be ignored. + You may be able to get the exact zoom ratio needed to trigger the lens switch from + your stock camera app and observing the zoom ratio it sets with the following command: + adb shell dumpsys media.camera | grep 'android.control.zoomRatio' -1 + Example for Google Pixel 7 Pro's back camera configuration: + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.5</item> <item>0.55632502</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + <item>0</item> <item>5.0</item> <item>5.0</item> + </string-array> + --> + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.5</item> <item>0.55632502</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + <item>0</item> <item>5.0</item> <item>5.0</item> + </string-array> +</resources> diff --git a/device-ice.mk b/device-ice.mk index 89fe78f..50ed94c 100644 --- a/device-ice.mk +++ b/device-ice.mk @@ -5,7 +5,9 @@ # # Overlays -DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-ice +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay-ice \ + $(LOCAL_PATH)/$(TARGET_DEVICE)/overlay-ice # EUICC PRODUCT_COPY_FILES += \ diff --git a/panther/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml b/panther/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml new file mode 100644 index 0000000..53a7bb5 --- /dev/null +++ b/panther/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + SPDX-FileCopyrightText: 2022 The LineageOS Project + SPDX-License-Identifier: Apache-2.0 +--> +<resources> + <!-- An array of triplets made of (camera ID, approximate zoom ratio, exact zoom ratio). + These values will be added to the lens selector if one or more cameras uses the + multi-camera API to let the user select which lens to use. + It's highly recommended to leave config_enableAuxCameras to false, since with + multi-camera API you only use a single camera device for all sensors. + You may enable it if you need auxiliary camera devices for a set of cameras on one + of the device's side (e.g. logical main back camera but multiple physical camera + devices on front), in that case if a main device side's lens is referenced here + all the auxiliary camera devices of that side will be ignored. + You may be able to get the exact zoom ratio needed to trigger the lens switch from + your stock camera app and observing the zoom ratio it sets with the following command: + adb shell dumpsys media.camera | grep 'android.control.zoomRatio' -1 + Example for Google Pixel 7 Pro's back camera configuration: + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.5</item> <item>0.55632502</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + <item>0</item> <item>5.0</item> <item>5.0</item> + </string-array> + --> + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.7</item> <item>0.67044306</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + </string-array> +</resources> |