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

Commit 35890fab authored by Kevin Chang's avatar Kevin Chang Committed by Android (Google) Code Review
Browse files

Merge "Improve the Accessibility warning dialog with new design" into qt-dev

parents 30a9392b bb6395eb
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="18dp"
    android:height="18dp"
    android:viewportWidth="48"
    android:viewportHeight="48">
  <group>
    <clip-path android:pathData="M0,0h48v48H0z M 0,0"/>
    <path
        android:pathData="M46,11v29c0,4.4 -3.6,8 -8,8H23.4c-2.16,0 -4.2,-0.86 -5.7,-2.38L2,29.66s2.52,-2.46 2.6,-2.5c0.44,-0.38 0.98,-0.58 1.58,-0.58 0.44,0 0.84,0.12 1.2,0.32 0.08,0.02 8.62,4.92 8.62,4.92V8c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v14h2V3c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v19h2V5c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v17h2V11c0,-1.66 1.34,-3 3,-3s3,1.34 3,3z"
        android:fillColor="#757575"/>
  </group>
</vector>
+9 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="18dp"
    android:height="18dp"
    android:viewportWidth="48"
    android:viewportHeight="48">
  <path
      android:pathData="M24,9C14,9 5.46,15.22 2,24c3.46,8.78 12,15 22,15 10.01,0 18.54,-6.22 22,-15 -3.46,-8.78 -11.99,-15 -22,-15zM24,34c-5.52,0 -10,-4.48 -10,-10s4.48,-10 10,-10 10,4.48 10,10 -4.48,10 -10,10zM24,18c-3.31,0 -6,2.69 -6,6s2.69,6 6,6 6,-2.69 6,-6 -2.69,-6 -6,-6z"
      android:fillColor="#757575"/>
</vector>
+71 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:textDirection="locale"
    android:scrollbarStyle="outsideOverlay"
    android:gravity="top">

    <LinearLayout
        android:theme="@style/Theme.AlertDialog"
        style="@style/AccessibilityDialog">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="center_horizontal"
            android:paddingTop="32dp"
            android:paddingLeft="24dp"
            android:paddingRight="24dp">

            <TextView
                android:id="@+id/permissionDialog_disable_title"
                style="@style/AccessibilityDialogTitle" />

            <TextView
                android:id="@+id/permissionDialog_disable_message"
                android:gravity="center"
                android:text="@string/accessibility_service_warning_description"
                style="@style/AccessibilityDialogDescription" />

        </LinearLayout>
            <!-- Buttons on bottom of dialog -->
            <LinearLayout
                style="@style/AccessibilityDialogButtonList">

                <Space
                    style="@style/AccessibilityDialogButtonBarSpace"/>

                <Button
                    android:id="@+id/permission_disable_stop_button"
                    android:text="@string/accessibility_dialog_button_stop"
                    style="@style/AccessibilityDialogButtonAllow" />

                <Button
                    android:id="@+id/permission_disable_cancel_button"
                    android:text="@string/accessibility_dialog_button_cancel"
                    style="@style/AccessibilityDialogButtonDeny" />

            </LinearLayout>

    </LinearLayout>

</ScrollView>
+109 −19
Original line number Diff line number Diff line
@@ -22,12 +22,25 @@
    android:scrollbarStyle="outsideOverlay"
    android:gravity="top">

    <LinearLayout
        android:theme="@style/Theme.AlertDialog"
        style="@style/AccessibilityDialog">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
        android:paddingStart="16dip"
        android:paddingEnd="16dip">
            android:gravity="center_horizontal"
            android:paddingLeft="24dp"
            android:paddingRight="24dp">

            <ImageView
                android:id="@+id/permissionDialog_icon"
                style="@style/AccessibilityDialogServiceIcon" />

            <TextView
                android:id="@+id/permissionDialog_title"
                style="@style/AccessibilityDialogTitle" />

            <TextView
                android:id="@+id/encryption_warning"
@@ -38,13 +51,90 @@
                android:textAppearance="?android:attr/textAppearanceMedium"/>

            <TextView
            android:id="@+id/accessibility_service_warning"
            android:layout_width="fill_parent"
                android:id="@+id/permissionDialog_description"
                android:text="@string/accessibility_service_warning_description"
                style="@style/AccessibilityDialogDescription" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
            android:padding="10dip"
            android:textAlignment="viewStart"
            android:textAppearance="?android:attr/textAppearanceMedium"/>
                android:orientation="horizontal"
                android:layout_marginBottom="24dp" >

                <ImageView
                    android:id="@+id/controlScreen_icon"
                    android:src="@drawable/ic_visibility_18dp"
                    style="@style/AccessibilityDialogIcon" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical" >

                    <TextView
                        android:id="@+id/controlScreen_title"
                        android:text="@string/accessibility_service_screen_control_title"
                        style="@style/AccessibilityDialogPermissionTitle" />

                    <TextView
                        android:id="@+id/controlScreen_description"
                        android:text="@string/accessibility_service_screen_control_description"
                        style="@style/AccessibilityDialogPermissionDescription" />

                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginBottom="24dp" >

                <ImageView
                    android:id="@+id/performAction_icon"
                    android:src="@drawable/ic_pan_tool_18dp"
                    style="@style/AccessibilityDialogIcon" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical" >

                    <TextView
                        android:id="@+id/performAction_title"
                        android:text="@string/accessibility_service_action_perform_title"
                        style="@style/AccessibilityDialogPermissionTitle" />

                    <TextView
                        android:id="@+id/performAction_description"
                        android:text="@string/accessibility_service_action_perform_description"
                        style="@style/AccessibilityDialogPermissionDescription" />

                </LinearLayout>

            </LinearLayout>

        </LinearLayout>

        <!-- Buttons on bottom of dialog -->
        <LinearLayout
            style="@style/AccessibilityDialogButtonList">

            <Space
                style="@style/AccessibilityDialogButtonBarSpace"/>

            <Button
                android:id="@+id/permission_enable_allow_button"
                android:text="@string/accessibility_dialog_button_allow"
                style="@style/AccessibilityDialogButtonAllow" />

            <Button
                android:id="@+id/permission_enable_deny_button"
                android:text="@string/accessibility_dialog_button_deny"
                style="@style/AccessibilityDialogButtonDeny" />

        </LinearLayout>
    </LinearLayout>

</ScrollView>
+37 −4
Original line number Diff line number Diff line
@@ -5080,8 +5080,9 @@
    <!-- Title for a warning about security implications of enabling an accessibility
         service. [CHAR LIMIT=NONE] -->
    <string name="enable_service_title">Use
         <xliff:g id="service" example="TalkBack">%1$s</xliff:g>?</string>
    <string name="enable_service_title">Allow
         <xliff:g id="service" example="TalkBack">%1$s</xliff:g> to have full contol of your
        device?</string>
    <!-- Title for the list of capabilities of an accessibility service. -->
    <string name="capabilities_list_title"><xliff:g id="service" example="TalkBack">%1$s</xliff:g>
        needs to:</string>
@@ -5122,11 +5123,43 @@
        This level of control is not appropriate for most apps.
    </string>
    <!-- Warning description that explains that it's appropriate for accessibility
         services to have full control to help users with accessibility needs. [CHAR LIMIT=NONE] -->
    <string name="accessibility_service_warning_description">Full control is appropriate for apps
        that help you with accessibility needs, but not for most apps.
    </string>
    <!-- Title for the screen control in accessibility dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_service_screen_control_title">View and control screen</string>
    <!-- Description for the screen control in accessibility dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_service_screen_control_description">It can read all content on the
        screen and display content over other apps.
    </string>
    <!-- Title for the action perform in accessibility dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_service_action_perform_title">View and platform actions</string>
    <!-- Description for the action perform in accessibility dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_service_action_perform_description">It can track your interactions
        with an app or a hardware sensor, and interact with apps on your behalf.
    </string>
    <!-- String for the allow button in accessibility permission dialog. [CHAR LIMIT=10] -->
    <string name="accessibility_dialog_button_allow">Allow</string>
    <!-- String for the deny button in accessibility permission dialog. [CHAR LIMIT=10] -->
    <string name="accessibility_dialog_button_deny">Deny</string>
    <!-- String for the allow button in accessibility permission dialog. [CHAR LIMIT=10] -->
    <string name="accessibility_dialog_button_stop">Stop</string>
    <!-- String for the deny button in accessibility permission dialog. [CHAR LIMIT=10] -->
    <string name="accessibility_dialog_button_cancel">Cancel</string>
    <!-- Title for a warning about disabling an accessibility service. [CHAR LIMIT=NONE] -->
    <string name="disable_service_title">Stop <xliff:g id="service" example="TalkBack">%1$s</xliff:g>?</string>
    <!-- Message for a warning about disabling accessibility service. [CHAR LIMIT=NONE] -->
    <string name="disable_service_message">Tapping OK will
        stop <xliff:g id="service" example="TalkBack">%1$s</xliff:g>.</string>
    <string name="disable_service_message">Tapping <xliff:g id="stop" example="Stop">%1$s</xliff:g> will
        stop <xliff:g id="service" example="TalkBack">%2$s</xliff:g>.</string>
    <!-- Title for the prompt shown as a placeholder if no accessibility services are installed. [CHAR LIMIT=50] -->
    <string name="accessibility_no_services_installed">No services installed</string>
Loading