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

Commit 0dea418d authored by Amy Hsu's avatar Amy Hsu Committed by Tsung-Mao Fang
Browse files

Add ScreenResolutionController to Settings app

Settings for resolution switch

Bug: b/199559703
Test: Check resolution switch UI in Settings app
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest

Change-Id: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
Merged-In: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
parent c08c6c5c
Loading
Loading
Loading
Loading
+19 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2022 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.
  -->

<shape>
</shape>
 No newline at end of file
+19 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2022 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.
  -->

<shape>
</shape>
 No newline at end of file
+12 −0
Original line number Original line Diff line number Diff line
@@ -583,6 +583,18 @@
        -->
        -->
    </string-array>
    </string-array>


    <!-- The option list for switch screen resolution -->
    <string-array name="config_screen_resolution_options_strings" translatable="false">
        <item>@string/screen_resolution_option_high</item>
        <item>@string/screen_resolution_option_highest</item>
    </string-array>

    <!-- The option summary list for screen resolution -->
    <string-array name="config_screen_resolution_summaries_strings" translatable="false">
        <item>@string/screen_resolution_summary_high</item>
        <item>@string/screen_resolution_summary_highest</item>
    </string-array>

    <!-- Whether to aggregate for network selection list-->
    <!-- Whether to aggregate for network selection list-->
    <bool name="config_network_selection_list_aggregation_enabled">false</bool>
    <bool name="config_network_selection_list_aggregation_enabled">false</bool>


+14 −0
Original line number Original line Diff line number Diff line
@@ -2908,6 +2908,18 @@
    <string name="auto_rotate_option_face_based">On - Face-based</string>
    <string name="auto_rotate_option_face_based">On - Face-based</string>
    <!-- SmartAutoRotatePreferenceFragment settings screen, face-based rotation switch label [CHAR LIMIT=30] -->
    <!-- SmartAutoRotatePreferenceFragment settings screen, face-based rotation switch label [CHAR LIMIT=30] -->
    <string name="auto_rotate_switch_face_based">Enable Face Detection</string>
    <string name="auto_rotate_switch_face_based">Enable Face Detection</string>
    <!-- Display settings screen, screen resolution settings title [CHAR LIMIT=30] -->
    <string name="screen_resolution_title">Screen resolution</string>
    <!-- Display settings screen, screen resolution option for "FHD+" [CHAR LIMIT=45] -->
    <string name="screen_resolution_option_high">High resolution</string>
    <!-- Display settings screen, screen resolution option for "QHD+" [CHAR LIMIT=45] -->
    <string name="screen_resolution_option_highest">Highest resolution</string>
    <!-- Display settings screen, "FHD+" screen resolution summary [CHAR LIMIT=NONE] -->
    <string name="screen_resolution_summary_high">1080p FHD+</string>
    <!-- Display settings screen, "QHD+" screen resolution summary [CHAR LIMIT=NONE] -->
    <string name="screen_resolution_summary_highest">1440p QHD+</string>
    <!-- Display settings screen, Color mode settings title [CHAR LIMIT=30] -->
    <!-- Display settings screen, Color mode settings title [CHAR LIMIT=30] -->
    <string name="color_mode_title">Colors</string>
    <string name="color_mode_title">Colors</string>
    <!-- Display settings screen, Color mode option for "natural(sRGB) color"  [CHAR LIMIT=45] -->
    <!-- Display settings screen, Color mode option for "natural(sRGB) color"  [CHAR LIMIT=45] -->
@@ -8265,6 +8277,8 @@
    <string name="keywords_default_apps">apps, default</string>
    <string name="keywords_default_apps">apps, default</string>
    <string name="keywords_ignore_optimizations">ignore optimizations, doze, app standby</string>
    <string name="keywords_ignore_optimizations">ignore optimizations, doze, app standby</string>
    <string name="keywords_color_mode">vibrant, RGB, sRGB, color, natural, standard</string>
    <string name="keywords_color_mode">vibrant, RGB, sRGB, color, natural, standard</string>
    <!-- Search keyword for "screen resolution" settings [CHAR_LIMIT=NONE]-->
    <string name="keywords_screen_resolution">FHD, QHD, resolution, 1080p, 1440p</string>
    <string name="keywords_color_temperature">color, temperature, D65, D73, white, yellow, blue, warm, cool</string>
    <string name="keywords_color_temperature">color, temperature, D65, D73, white, yellow, blue, warm, cool</string>
    <string name="keywords_lockscreen">slide to unlock, password, pattern, PIN</string>
    <string name="keywords_lockscreen">slide to unlock, password, pattern, PIN</string>
    <!-- Search keyword for App pinning Settings [CHAR LIMIT=NONE] -->
    <!-- Search keyword for App pinning Settings [CHAR LIMIT=NONE] -->
+7 −0
Original line number Original line Diff line number Diff line
@@ -117,6 +117,13 @@
            settings:keywords="@string/keywords_auto_rotate"
            settings:keywords="@string/keywords_auto_rotate"
            settings:controller="com.android.settings.display.DeviceStateAutoRotateOverviewController"/>
            settings:controller="com.android.settings.display.DeviceStateAutoRotateOverviewController"/>


        <Preference
            android:key="screen_resolution"
            android:title="@string/screen_resolution_title"
            android:fragment="com.android.settings.display.ScreenResolutionFragment"
            settings:keywords="@string/keywords_screen_resolution"
            settings:controller="com.android.settings.display.ScreenResolutionController"/>

        <SwitchPreference
        <SwitchPreference
            android:key="display_white_balance"
            android:key="display_white_balance"
            android:title="@string/display_white_balance_title"
            android:title="@string/display_white_balance_title"
Loading