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

Commit d6f13c1c authored by Leon Liao's avatar Leon Liao Committed by Android (Google) Code Review
Browse files

Merge "Implement a11y UI for Accessibility timeout feature."

parents 83680c7c fc29b1c3
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -697,6 +697,33 @@
        <item>Accessibility volume</item>
    </string-array>

    <!-- Keys for the list of accessibility timeouts xml. -->
    <string-array name="accessibility_timeout_content_selector_keys" translatable="false">
        <item>accessibility_content_timeout_default</item>
        <item>accessibility_content_timeout_10secs</item>
        <item>accessibility_content_timeout_30secs</item>
        <item>accessibility_content_timeout_1min</item>
        <item>accessibility_content_timeout_2mins</item>
    </string-array>

    <!-- Keys for the list of accessibility timeouts xml. -->
    <string-array name="accessibility_timeout_control_selector_keys" translatable="false">
        <item>accessibility_control_timeout_default</item>
        <item>accessibility_control_timeout_10secs</item>
        <item>accessibility_control_timeout_30secs</item>
        <item>accessibility_control_timeout_1min</item>
        <item>accessibility_control_timeout_2mins</item>
    </string-array>

    <!-- Values for the list of accessibility timeouts, pairs to Keys . -->
    <integer-array name="accessibility_timeout_selector_values" translatable="false">
        <item>0</item>
        <item>10000</item>
        <item>30000</item>
        <item>60000</item>
        <item>120000</item>
    </integer-array>

    <!-- Titles for the list of long press timeout options. -->
    <string-array name="long_press_timeout_selector_titles">
        <!-- A title for the option for short long-press timeout [CHAR LIMIT=25] -->
+18 −0
Original line number Diff line number Diff line
@@ -4575,6 +4575,24 @@
    <string name="accessibility_toggle_master_mono_title">Mono audio</string>
    <!-- Summary for the accessibility preference for master mono. [CHAR LIMIT=50] -->
    <string name="accessibility_toggle_master_mono_summary">Combine channels when playing audio</string>
    <!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_timeout_default">Default</string>
    <!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_timeout_10secs">10 seconds</string>
    <!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_timeout_30secs">30 seconds</string>
    <!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_timeout_1min">1 minute</string>
    <!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_timeout_2mins">2 minutes</string>
    <!-- Title for accessibility preference to accessibility message_timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_accessibility_content_timeout_preference_title">Content Timeout</string>
    <!-- Title for accessibility preference to accessibility message_timeout. [CHAR LIMIT=35] -->
    <string name="accessibility_accessibility_control_timeout_preference_title">Control Timeout</string>
    <!-- Title for accessibility preference to accessibility message_timeout. [CHAR LIMIT=NONE] -->
    <string name="accessibility_accessibility_timeout_preference_summary">Choose how long it takes before automatically disappearing messages go away.\nSome apps may not support this setting yet.</string>
    <!-- Title for accessibility preference to choose long-press delay i.e. timeout before it is detected. [CHAR LIMIT=35] -->
    <string name="accessibility_long_press_timeout_preference_title">Touch &amp; hold delay</string>
    <!-- Title for the accessibility preference to configure display color inversion. [CHAR LIMIT=NONE] -->
+63 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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:app="http://schemas.android.com/apk/res-auto"
    android:key="accessibility_content_timeout_preference"
    android:title="@string/accessibility_accessibility_content_timeout_preference_title"
    android:persistent="false" >

    <com.android.settings.widget.VideoPreference
        android:key="accessibility_content_timeout_video"
        app:animation="@raw/gesture_swipe_up"
        app:preview="@drawable/gesture_swipe_up"
        android:persistent="false" />

    <Preference
        android:key="accessibility_content_timeout_summary"
        android:selectable="false"
        android:enabled="true"
        android:summary="@string/accessibility_accessibility_timeout_preference_summary"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_content_timeout_default"
        android:title="@string/accessibility_timeout_default"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_content_timeout_10secs"
        android:title="@string/accessibility_timeout_10secs"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_content_timeout_30secs"
        android:title="@string/accessibility_timeout_30secs"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_content_timeout_1min"
        android:title="@string/accessibility_timeout_1min"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_content_timeout_2mins"
        android:title="@string/accessibility_timeout_2mins"
        android:persistent="false" />

</PreferenceScreen>
+63 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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:app="http://schemas.android.com/apk/res-auto"
    android:key="accessibility_control_timeout_preference"
    android:title="@string/accessibility_accessibility_control_timeout_preference_title"
    android:persistent="false" >

    <com.android.settings.widget.VideoPreference
        android:key="accessibility_control_timeout_video"
        app:animation="@raw/gesture_swipe_up"
        app:preview="@drawable/gesture_swipe_up"
        android:persistent="false" />

    <Preference
        android:key="accessibility_control_timeout_summary"
        android:selectable="false"
        android:enabled="true"
        android:summary="@string/accessibility_accessibility_timeout_preference_summary"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_control_timeout_default"
        android:title="@string/accessibility_timeout_default"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_control_timeout_10secs"
        android:title="@string/accessibility_timeout_10secs"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_control_timeout_30secs"
        android:title="@string/accessibility_timeout_30secs"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_control_timeout_1min"
        android:title="@string/accessibility_timeout_1min"
        android:persistent="false" />

    <com.android.settings.widget.RadioButtonPreference
        android:key="accessibility_control_timeout_2mins"
        android:title="@string/accessibility_timeout_2mins"
        android:persistent="false" />

</PreferenceScreen>
+15 −0
Original line number Diff line number Diff line
@@ -71,6 +71,14 @@
        <SwitchPreference
            android:key="toggle_disable_animations"
            android:title="@string/accessibility_disable_animations" />

        <Preference
            android:fragment="com.android.settings.accessibility.AccessibilityContentTimeoutPreferenceFragment"
            android:key="accessibility_content_timeout_preference_fragment"
            android:title="@string/accessibility_accessibility_content_timeout_preference_title"
            android:icon="@drawable/ic_accessibility_generic"
            android:persistent="false" />

    </PreferenceCategory>

    <PreferenceCategory
@@ -100,6 +108,13 @@
                android:entryValues="@array/long_press_timeout_selector_values"
                android:persistent="false"/>

        <Preference
            android:fragment="com.android.settings.accessibility.AccessibilityControlTimeoutPreferenceFragment"
            android:key="accessibility_control_timeout_preference_fragment"
            android:title="@string/accessibility_accessibility_control_timeout_preference_title"
            android:icon="@drawable/ic_accessibility_generic"
            android:persistent="false" />

        <Preference
            android:fragment="com.android.settings.accessibility.VibrationSettings"
            android:key="vibration_preference_screen"
Loading