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

Commit f09703d4 authored by Piotr Wilczyński's avatar Piotr Wilczyński Committed by Android (Google) Code Review
Browse files

Merge "HDR brightness setting" into main

parents b12cb3bc db64ef5c
Loading
Loading
Loading
Loading
+845 KiB
Loading image diff...
+72 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2025 The Android Open Source Project

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/background_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:adjustViewBounds="true"
        android:src="@drawable/protection_background"
        android:contentDescription="@null"/>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center">

        <LinearLayout android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_margin="15dp">
            <ImageView android:id="@+id/standard_image"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:contentDescription="@null" />
            <TextView android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/hdr_brightness_standard_image_label"
                android:textColor="?android:attr/textColorPrimary"
                android:layout_gravity="center"
                android:layout_marginTop="10dp" />
        </LinearLayout>

        <LinearLayout android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_margin="15dp">
            <ImageView android:id="@+id/hdr_image"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:contentDescription="@null" />
            <TextView android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/hdr_brightness_hdr_image_label"
                android:textColor="?android:attr/textColorPrimary"
                android:layout_gravity="center"
                android:layout_marginTop="10dp" />
        </LinearLayout>

    </LinearLayout>

</FrameLayout>
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
@@ -3136,6 +3136,18 @@
    <string name="auto_brightness_summary_on">On</string>
    <!-- Setting option summary when adaptive brightness is off [CHAR LIMIT=NONE] -->
    <string name="auto_brightness_summary_off">Off</string>
    <!-- HDR brightness screen, setting option name to control HDR brightness [CHAR LIMIT=60] -->
    <string name="hdr_brightness_title">Enhanced HDR brightness</string>
    <!-- HDR brightness screen, setting the brightness level. [CHAR LIMIT=30] -->
    <string name="hdr_brightness_level_title">Intensity</string>
    <!-- HDR brightness screen, image label. [CHAR LIMIT=30] -->
    <string name="hdr_brightness_standard_image_label">Standard image</string>
    <!-- HDR brightness screen, image label. [CHAR LIMIT=30] -->
    <string name="hdr_brightness_hdr_image_label">HDR image</string>
    <!-- HDR brightness screen warning. -->
    <string name="hdr_brightness_warning">This setting only affects images and videos that support High Dynamic Range (HDR).</string>
    <!-- Display settings screen, display white balance settings title [CHAR LIMIT=30] -->
    <string name="display_white_balance_title">Display white balance</string>
    <!-- Display settings screen, display white balance settings summary [CHAR LIMIT=NONE] -->
@@ -3286,6 +3298,9 @@
    </string>
    <!-- Dark UI screen footer action text linking to Modes settings. [CHAR LIMIT=NONE] -->
    <string name="dark_ui_modes_footer_action">Modes settings</string>
    <!-- HDR brightness screen, summary of the feature. [CHAR LIMIT=NONE] -->
    <string name="hdr_brigtness_text">Brighten and expand the color range and clarity in High Dynamic Range (HDR) images and videos. HDR content will appear brighter.</string>
    <!-- Sound & display settings screen, setting option name to change screen timeout -->
    <string name="screen_timeout">Screen timeout</string>
@@ -8359,6 +8374,7 @@ Data usage charges may apply.</string>
    <string name="keywords_display_font_size">text size</string>
    <!-- Search keyword for "Cast" settings [CHAR_LIMIT=NONE]-->
    <string name="keywords_display_cast_screen">project, cast, Screen mirroring, Screen sharing, mirroring, share screen, screen casting</string>
    <string name="keywords_display_hdr_brightness">hdr, brightness, high dynamic range, brighten, brighter</string>
    <string name="keywords_storage">space, disk, hard drive, device usage</string>
    <string name="keywords_battery">power usage, charge</string>
    <string name="keywords_battery_usage">view battery usage, battery usage, power usage</string>
@@ -13608,6 +13624,8 @@ Data usage charges may apply.</string>
    <string name="dark_theme_main_switch_title">Use Dark theme</string>
    <!-- Title for bluetooth main switch. [CHAR LIMIT=50] -->
    <string name="bluetooth_main_switch_title">Use Bluetooth</string>
    <!-- Title for HDR brightness main switch. [CHAR LIMIT=50] -->
    <string name="hdr_brightness_main_switch_title">Use enhanced HDR brightness</string>
    <!-- Title for prevent ringing main switch. [CHAR LIMIT=50] -->
    <string name="prevent_ringing_main_switch_title">Use prevent ringing</string>
+8 −0
Original line number Diff line number Diff line
@@ -42,6 +42,14 @@
            settings:userRestriction="no_config_brightness"
            settings:controller="com.android.settings.display.AutoBrightnessPreferenceController" />

        <com.android.settingslib.PrimarySwitchPreference
            android:fragment="com.android.settings.display.HdrBrightnessSettings"
            android:key="hdr_preference"
            android:persistent="false"
            android:title="@string/hdr_brightness_title"
            settings:keywords="@string/keywords_display_hdr_brightness"
            settings:controller="com.android.settings.display.HdrBrightnessPreferenceController"/>

    </PreferenceCategory>

    <PreferenceCategory
+48 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2025 The Android Open Source Project

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/hdr_brightness_title">

    <com.android.settingslib.widget.TopIntroPreference
        android:key="hdr_brightness_top_intro"
        android:title="@string/hdr_brigtness_text"
        settings:searchable="false"/>

    <com.android.settingslib.widget.LayoutPreference
        android:key="preview"
        android:layout="@layout/hdr_brightness_preview"/>

    <com.android.settingslib.widget.MainSwitchPreference
        android:key="hdr_brightness_activated"
        android:title="@string/hdr_brightness_main_switch_title"
        settings:controller="com.android.settings.display.HdrBrightnessPreferenceController"/>

    <com.android.settingslib.widget.SliderPreference
        android:key="hdr_brightness_level"
        android:title="@string/hdr_brightness_level_title"
        settings:keywords="@string/keywords_display_hdr_brightness"
        settings:controller="com.android.settings.display.HdrBrightnessLevelPreferenceController"/>

    <com.android.settingslib.widget.FooterPreference
        android:title="@string/hdr_brightness_warning"
        android:selectable="false"
        settings:searchable="false" />

</PreferenceScreen>
Loading