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

Commit 9b906cb5 authored by Stanley Wang's avatar Stanley Wang
Browse files

Use MainSwitchPreference on Bubbles, Screen Saver and

One-Handed mode pages.

Fixes: 178679876
Fixes: 177968619
Test: robotest and see the UIs.
Change-Id: Ic62c7464a71e5410ece5d1db7578c522e1babedc
parent c830499a
Loading
Loading
Loading
Loading

res/layout/dream_start_button.xml

deleted100644 → 0
+0 −38
Original line number Diff line number Diff line
<?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>
 No newline at end of file
+4 −6
Original line number Diff line number Diff line
@@ -3121,8 +3121,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 -->
@@ -8747,10 +8745,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>
@@ -13236,6 +13230,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 Wi‑Fi 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>
+6 −10
Original line number Diff line number Diff line
@@ -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>
+5 −10
Original line number Diff line number Diff line
@@ -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>
+6 −6
Original line number Diff line number Diff line
@@ -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"
Loading