Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 349a6be7 authored by Rohit Sekhar's avatar Rohit Sekhar Committed by Michael Bestas
Browse files

FP5: AutoBrightness: Use qti.sensor.light.back for measurements

* and.. align parameters with stock

Change-Id: I888ffc86526356fe6162269aaa8d236300907ce8
parent cde5a731
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<displayConfiguration>
    <screenBrightnessMap>
        <point>
            <value>0.004</value>
            <nits>6.0</nits>
        </point>
        <point>
            <value>0.829995</value>
            <nits>800</nits>
        </point>
        <point>
            <value>1.0</value>
            <nits>880</nits>
        </point>
    </screenBrightnessMap>
    <screenBrightnessDefault>0.4</screenBrightnessDefault>
    <lightSensor>
        <type>qti.sensor.light.back</type>
    </lightSensor>
    <ambientLightHorizonLong>8000</ambientLightHorizonLong>
</displayConfiguration>
+3 −0
Original line number Diff line number Diff line
@@ -144,6 +144,9 @@ PRODUCT_PACKAGES += \
    vendor.qti.hardware.display.mapper@3.0.vendor \
    vendor.qti.hardware.display.mapper@4.0.vendor

PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/configs/displayconfig/display_id_4630946480328692354.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_id_4630946480328692354.xml

PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml

+53 −32
Original line number Diff line number Diff line
@@ -95,21 +95,38 @@
         the restoring is handled by modem if it is true -->
    <bool name="skip_restoring_network_selection">true</bool>

    <!-- Array of output values for LCD backlight corresponding to the lux values
         in the config_autoBrightnessLevels array.  This array should have size one greater
         than the size of the config_autoBrightnessLevels array.
         The brightness values must be between 0 and 255 and be non-decreasing.
         This must be overridden in platform specific overlays -->
    <integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>1</item>
        <item>20</item>
        <item>40</item>
        <item>70</item>
        <item>110</item>
        <item>160</item>
        <item>200</item>
        <item>255</item>
    </integer-array>
    <!-- Array of desired screen brightness in nits corresponding to the lux values
         in the config_autoBrightnessLevels array. The display brightness is defined as the measured
         brightness of an all-white image.

         If this is defined then:
            - config_autoBrightnessLcdBacklightValues should not be defined
            - config_screenBrightnessNits must be defined
            - config_screenBrightnessBacklight must be defined

         This array should have size one greater than the size of the config_autoBrightnessLevels
         array. The brightness values must be non-negative and non-decreasing. This must be
         overridden in platform specific overlays -->
    <array name="config_autoBrightnessDisplayValuesNits">
         <item>6.0</item>    <!-- 0 -->
         <item>15</item>     <!-- 0-1 -->
         <item>20</item>     <!-- 1-5 -->
         <item>31</item>     <!-- 5-10 -->
         <item>65</item>     <!-- 10-25 -->
         <item>70</item>     <!-- 25-50 -->
         <item>80</item>     <!-- 50-100 -->
         <item>100</item>    <!-- 100-200 -->
         <item>120</item>    <!-- 200-500 -->
         <item>170</item>    <!-- 500-1000 -->
         <item>280</item>    <!-- 1000-2000 -->
         <item>350</item>    <!-- 2000-3000 -->
         <item>400</item>    <!-- 3000-4000 -->
         <item>450</item>    <!-- 4000-5000 -->
         <item>500</item>    <!-- 5000-6000 -->
         <item>550</item>    <!-- 6000-8000 -->
         <item>600</item>    <!-- 8000-10000 -->
         <item>800</item>    <!-- 10000-20000 -->
    </array>

    <!-- Array of light sensor lux values to define our levels for auto backlight brightness support.
         The N entries of this array define N + 1 control points as follows:
@@ -133,12 +150,22 @@
         Must be overridden in platform specific overlays -->
    <integer-array name="config_autoBrightnessLevels">
        <item>1</item>
        <item>5</item>
        <item>10</item>
        <item>25</item>
        <item>50</item>
        <item>100</item>
        <item>200</item>
        <item>500</item>
        <item>1000</item>
        <item>2000</item>
        <item>3000</item>
        <item>4000</item>
        <item>5000</item>
        <item>6000</item>
        <item>8000</item>
        <item>10000</item>
        <item>20000</item>
    </integer-array>

    <!-- Stability requirements in milliseconds for accepting a new brightness level.  This is used
@@ -149,28 +176,22 @@
    <integer name="config_autoBrightnessBrighteningLightDebounce">1000</integer>
    <integer name="config_autoBrightnessDarkeningLightDebounce">1000</integer>

    <!-- Minimum allowable screen brightness to use in a very dark room.
         This value sets the floor for the darkest possible auto-brightness
         adjustment.  It is expected to be somewhat less than the first entry in
         config_autoBrightnessLcdBacklightValues so as to allow the user to have
         some range of adjustment to dim the screen further than usual in very
         dark rooms. The contents of the screen must still be clearly visible
         in darkness (although they may not be visible in a bright room). -->
    <integer name="config_screenBrightnessDark">3</integer>

    <!-- Screen brightness used to dim the screen when the user activity
         timeout expires.  May be less than the minimum allowed brightness setting
         that can be set by the user. -->
    <integer name="config_screenBrightnessDim">3</integer>

    <!-- Screen brightness used to dim the screen while dozing in a very low power state.
         May be less than the minimum allowed brightness setting
         that can be set by the user. -->
    <integer name="config_screenBrightnessDoze">17</integer>

    <!-- Minimum screen brightness setting allowed by the power manager.
    <!-- Maximum screen brightness allowed by the power manager.
         -2 is invalid so setting will resort to int value specified above.
         Set this to 1.0 for maximum brightness range.
         The user is forbidden from setting the brightness above this level. -->
    <item name="config_screenBrightnessSettingMaximumFloat" format="float" type="dimen">0.829995</item>

    <!-- Minimum screen brightness setting allowed by power manager.
         -2 is invalid so setting will resort to int value specified above.
         Set this to 0.0 to allow screen to go to minimal brightness.
         The user is forbidden from setting the brightness below this level. -->
    <integer name="config_screenBrightnessSettingMinimum">3</integer>
    <item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.007083538</item>

    <!-- Default files to pin via Pinner Service -->
    <string-array name="config_defaultPinnerServiceFiles" translatable="false">