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

Commit 4bca97c3 authored by Sally Yuen's avatar Sally Yuen Committed by Android (Google) Code Review
Browse files

Merge changes from topic "a11y_rbc"

* changes:
  Add activity for directly navigating to Reduce Bright Colors setting page
  Add a setting page for Reduce Bright Colors under A11y
parents 190a1a47 9fe91b9a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -1596,6 +1596,24 @@
                android:value="true" />
        </activity>

        <activity
            android:name="Settings$ReduceBrightColorsSettingsActivity"
            android:exported="true"
            android:label="@string/reduce_bright_colors_preference_title">
            <intent-filter android:priority="1">
                <action android:name="android.settings.REDUCE_BRIGHT_COLORS_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.accessibility.ToggleReduceBrightColorsPreferenceFragment" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                       android:value="true" />
        </activity>

        <activity
            android:name="Settings$CaptioningSettingsActivity"
            android:exported="true"
+12 −0
Original line number Diff line number Diff line
@@ -5239,6 +5239,18 @@
    <!-- Summary shown for tritanomaly (blue-yellow color blindness) [CHAR LIMIT=45] -->
    <string name="daltonizer_mode_tritanomaly_summary">Blue-yellow</string>
    <!-- TODO(b/170970602): remove translatable=false when RBC has official name and strings -->
    <!-- Title for the accessibility preference to configure Reduce Bright Colors feature. [CHAR LIMIT=NONE] -->
    <string name="reduce_bright_colors_preference_title" translatable="false">Reduce Bright Colors</string>
    <!-- Used in the accessibility service settings to control switching Reduce Bright Colors on/off. [CHAR LIMIT=NONE] -->
    <string name="reduce_bright_colors_switch_title" translatable="false">Use Reduce Bright Colors</string>
    <!-- Subtitle that describes Reduce Bright Colors. [CHAR LIMIT=NONE] -->
    <string name="reduce_bright_colors_preference_subtitle" translatable="false">Reduce Bright Colors reduces screen brightness.</string>
    <!-- Title for setting the brightness intensity of the display using Reduce Bright Colors. [CHAR LIMIT=NONE] -->
    <string name="reduce_bright_colors_intensity_preference_title" translatable="false">Intensity</string>
    <!-- Title for setting whether the Reduce Bright Colors activation state persists across reboots. [CHAR LIMIT=NONE] -->
    <string name="reduce_bright_colors_persist_preference_title" translatable="false">Keeps feature on after a restart</string>
    <!-- Subtitle for the accessibility preference to configure feature that performs click action soon after mouse/trackpad pointer stops moving, in case delay before click is extremely short. Placeholder will be set to the number of milliseconds to which the delay amounts. [CHAR LIMIT=NONE] -->
    <plurals name="accessibilty_autoclick_preference_subtitle_short_delay">
        <item quantity="one">Short (<xliff:g id="click_delay_label" example="200">%1$s</xliff:g> second)</item>
+8 −0
Original line number Diff line number Diff line
@@ -231,6 +231,14 @@
            android:summary="@string/accessibility_shortcut_description"
            settings:controller="com.android.settings.accessibility.AccessibilityShortcutPreferenceController"/>

        <!--TODO(b/170973645): Get icon-->
        <Preference
            android:fragment="com.android.settings.accessibility.ToggleReduceBrightColorsPreferenceFragment"
            android:key="reduce_bright_colors_preference"
            android:persistent="false"
            android:title="@string/reduce_bright_colors_preference_title"
            settings:controller="com.android.settings.accessibility.ReduceBrightColorsPreferenceController"/>

    </PreferenceCategory>

</PreferenceScreen>
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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"
    android:persistent="false"
    android:title="@string/reduce_bright_colors_preference_title">

    <com.android.settings.widget.SeekBarPreference
        android:key="rbc_intensity"
        android:persistent="false"
        android:title="@string/reduce_bright_colors_intensity_preference_title"/>

    <SwitchPreference
        android:key="rbc_persist"
        android:persistent="false"
        android:title="@string/reduce_bright_colors_persist_preference_title" />
</PreferenceScreen>
+4 −0
Original line number Diff line number Diff line
@@ -111,6 +111,10 @@ public class Settings extends SettingsActivity {
    public static class AccessibilityInversionSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AccessibilityContrastSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AccessibilityDaltonizerSettingsActivity extends SettingsActivity { /* empty */ }
    /**
     * Activity for Reduce Bright Colors.
     */
    public static class ReduceBrightColorsSettingsActivity extends SettingsActivity { /* empty */ }
    public static class SecurityDashboardActivity extends SettingsActivity { /* empty */ }
    public static class UsageAccessSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AppUsageAccessSettingsActivity extends SettingsActivity { /* empty */ }
Loading