summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cheetah/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml31
-rw-r--r--device-ice.mk4
-rw-r--r--panther/overlay-ice/packages/apps/Aperture/app/src/main/res/values/config.xml30
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>