Merge "Use MainSwitchPreference on Bubbles, Screen Saver and One-Handed mode pages." into sc-dev am: 9abe5df134

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14160600

Change-Id: Ie0124aac157e8349f9868a5958e1d6a7fc135eb3
This commit is contained in:
Stanley Wang
2021-05-05 03:38:15 +00:00
committed by Automerger Merge Worker
12 changed files with 169 additions and 186 deletions

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:gravity="bottom"
android:paddingTop="4dp"
android:paddingStart="72dp"
android:paddingEnd="72dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/dream_start_now_button"
style="@style/ActionSecondaryButton"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/screensaver_settings_dream_start"
android:paddingEnd="8dp" />
</LinearLayout>

View File

@@ -3122,8 +3122,6 @@
<string name="screensaver_settings_when_to_dream">When to start</string>
<!-- Dream settings screen, action label, current selected screen saver -->
<string name="screensaver_settings_current">Current screen saver</string>
<!-- Dream settings screen, button label to start dreaming -->
<string name="screensaver_settings_dream_start">Start now</string>
<!-- Dream settings screen, button label for settings for a specific screensaver -->
<string name="screensaver_settings_button">Settings</string>
<!-- Sound & display settings screen, setting option name to change whether the screen adjusts automatically based on lighting conditions -->
@@ -8746,10 +8744,6 @@
<!-- Bubble feature settings: Description for toggle when bubbles are turned on in notification settings [CHAR LIMIT=100] -->
<string name="notifications_bubble_setting_on_summary">On / Conversations can appear as floating icons</string>
<!-- Bubble feature settings: Title of the toggle to turn bubbles on and off [CHAR LIMIT=100] -->
<string name="notifications_bubble_setting_title">Allow apps to show bubbles</string>
<!-- Bubble feature settings: Description shown with the toggle to turn bubbles on and off [CHAR LIMIT=NONE]-->
<string name="notifications_bubble_setting_description">Some conversations will appear as floating icons on top of other apps</string>
<!-- Bubble app settings: option allowing all conversations from an app to bubble if the app sends bubbles [CHAR LIMIT=60]-->
<string name="bubble_app_setting_all">All conversations can bubble</string>
@@ -13232,6 +13226,10 @@
<string name="adaptive_brightness_main_switch_title">Use adaptive brightness</string>
<!-- Title for wifi calling main switch preferences. [CHAR LIMIT=50] -->
<string name="wifi_calling_main_switch_title">Use WiFi calling</string>
<!-- Title for Bubbles main switch preferences. [CHAR LIMIT=50] -->
<string name="bubbles_main_switch_title">Use Bubbles</string>
<!-- Title for Screen saver main switch preferences. [CHAR LIMIT=50] -->
<string name="screen_saver_main_switch_title">Use screen saver</string>
<!-- Default preference title for showing all apps on device [CHAR_LIMIT=50]-->
<string name="default_see_all_apps_title">See all apps</string>

View File

@@ -18,6 +18,11 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/bubbles_app_toggle_title">
<com.android.settingslib.widget.MainSwitchPreference
android:key="global_notification_bubbles"
android:title="@string/bubbles_main_switch_title"
settings:controller="com.android.settings.notification.BubbleNotificationPreferenceController"/>
<com.android.settings.widget.VideoPreference
android:key="bubbles_illustration"
android:title="@string/summary_placeholder"
@@ -25,13 +30,4 @@
settings:controller="com.android.settings.widget.VideoPreferenceController"
android:persistent="false" />
<!-- Notification bubbles -->
<SwitchPreference
android:key="global_notification_bubbles"
android:icon="@drawable/ic_create_bubble"
settings:allowDividerAbove="true"
android:title="@string/notifications_bubble_setting_title"
android:summary="@string/notifications_bubble_setting_description"
settings:controller="com.android.settings.notification.BubbleNotificationPreferenceController"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -19,6 +19,11 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/screensaver_settings_title">
<com.android.settingslib.widget.MainSwitchPreference
android:key="dream_start_now_button_container"
android:title="@string/screen_saver_main_switch_title"
settings:controller="com.android.settings.dream.StartNowPreferenceController"/>
<com.android.settings.widget.GearPreference
android:key="current_screensaver"
android:title="@string/screensaver_settings_current"
@@ -30,14 +35,4 @@
android:title="@string/screensaver_settings_when_to_dream"
android:fragment="com.android.settings.dream.WhenToDreamPicker" />
<!-- Layout preference doesn't obey allowDividerAbove, so put it in a PreferenceCategory -->
<PreferenceCategory
android:key="dream_start_now_category">
<com.android.settingslib.widget.LayoutPreference
android:key="dream_start_now_button_container"
android:selectable="false"
android:layout="@layout/dream_start_button" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -21,6 +21,12 @@
android:persistent="false"
android:title="@string/one_handed_title">
<com.android.settingslib.widget.MainSwitchPreference
android:key="gesture_one_handed_mode_enabled"
android:title="@string/one_handed_mode_enabled"
settings:keywords="@string/keywords_one_handed"
settings:controller="com.android.settings.gestures.OneHandedEnablePreferenceController"/>
<com.android.settingslib.widget.LayoutPreference
android:key="one_handed_header"
android:layout="@layout/one_handed_header"
@@ -29,12 +35,6 @@
settings:allowDividerBelow="false"
settings:searchable="false"/>
<SwitchPreference
android:key="gesture_one_handed_mode_enabled"
android:title="@string/one_handed_mode_enabled"
settings:keywords="@string/keywords_one_handed"
settings:controller="com.android.settings.gestures.OneHandedEnablePreferenceController"/>
<SwitchPreference
android:key="gesture_app_taps_to_exit"
android:title="@string/one_handed_app_taps_to_exit"