Skip to content
Snippets Groups Projects
Unverified Commit a8ad91ec authored by Michael Bestas's avatar Michael Bestas
Browse files

pantah: overlay: Configure aux cameras for Aperture

Change-Id: I3d1c93057b5c2a1ba09c06a945d538d2043f30fd
parent 9f927893
No related branches found
No related tags found
No related merge requests found
#
# Copyright (C) 2022 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/cheetah/overlay-lineage
$(call inherit-product, $(LOCAL_PATH)/device-lineage.mk)
<?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>
......@@ -11,7 +11,8 @@ $(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/google/pantah/aosp_cheetah.mk)
$(call inherit-product, device/google/gs201/lineage_common.mk)
$(call inherit-product, device/google/pantah/device-lineage.mk)
include device/google/pantah/cheetah/device-lineage.mk
# Device identifier. This must come after all inclusions
PRODUCT_BRAND := google
......
......@@ -11,7 +11,8 @@ $(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/google/pantah/aosp_panther.mk)
$(call inherit-product, device/google/gs201/lineage_common.mk)
$(call inherit-product, device/google/pantah/device-lineage.mk)
include device/google/pantah/panther/device-lineage.mk
# Device identifier. This must come after all inclusions
PRODUCT_BRAND := google
......
#
# Copyright (C) 2022 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/panther/overlay-lineage
$(call inherit-product, $(LOCAL_PATH)/device-lineage.mk)
<?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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment