Files
app_Settings/res/xml/user_aspect_ratio_details.xml
Graciela Wissen Putri fa945cc808 [4/n] Add fullscreen option in user aspect ratio settings
Apps > App Info > Advanced > Aspect ratio

Adds fullscreen option to aspect ratio settings gated by fullscreen
build time and runtime flags. If fullscreen option is disabled, return
app default option.

To enable feature:
adb shell device_config put window_manager
enable_app_compat_user_aspect_ratio_settings true
adb shell am force-stop com.android.settings

Bug: 291900454
Test: All Settings CUJs passed
      atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I8f8d0c08ac81f088d6c25e8dfb3550f807f336b6
2023-07-28 10:09:56 +00:00

59 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2023 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/aspect_ratio_title">
<com.android.settingslib.widget.ActionButtonsPreference
android:key="header_view" />
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="app_default_pref"
android:title="@string/user_aspect_ratio_app_default"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="fullscreen_pref"
android:title="@string/user_aspect_ratio_fullscreen"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="half_screen_pref"
android:title="@string/user_aspect_ratio_half_screen"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="display_size_pref"
android:title="@string/user_aspect_ratio_device_size"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="16_9_pref"
android:title="@string/user_aspect_ratio_16_9"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="4_3_pref"
android:title="@string/user_aspect_ratio_4_3"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="3_2_pref"
android:title="@string/user_aspect_ratio_3_2"/>
<com.android.settingslib.widget.FooterPreference
android:title="@string/app_aspect_ratio_footer"
android:selectable="false"
settings:searchable="false"/>
</PreferenceScreen>