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

Commit 8c1c5111 authored by ryanlwlin's avatar ryanlwlin
Browse files

Make mirror window Accessible (1/2)

Hide all non-important child nodes and make the root
could the ability to get accessibility focus.

Test: manually test with Talkback
Bug: 143852371
Change-Id: I89155ce969e4688e5a07f0b427b0fe99626cfc8a
parent 5f99e1b8
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -17,24 +17,26 @@

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content">

             android:layout_height="wrap_content"
             android:screenReaderFocusable="true">
    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="@dimen/magnification_outer_border_margin"
        android:importantForAccessibility="no"
        android:background="@android:color/black"/>

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="@dimen/magnification_inner_border_margin"
        android:importantForAccessibility="no"
        android:background="@color/magnification_border_color"/>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        android:importantForAccessibility="noHideDescendants">

        <View
            android:id="@+id/left_handle"
@@ -76,6 +78,7 @@
        android:layout_margin="@dimen/magnification_outer_border_margin"
        android:layout_gravity="right|bottom"
        android:scaleType="center"
        android:importantForAccessibility="no"
        android:src="@drawable/ic_move_magnification"/>

</FrameLayout>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -730,7 +730,8 @@ public class AccessibilityWindowManager {
                case WindowManager.LayoutParams.TYPE_SYSTEM_ERROR:
                case WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY:
                case WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY:
                case WindowManager.LayoutParams.TYPE_SCREENSHOT: {
                case WindowManager.LayoutParams.TYPE_SCREENSHOT:
                case WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY: {
                    return AccessibilityWindowInfo.TYPE_SYSTEM;
                }