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

Commit d4cb76eb authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Preventing widget preview from getting accessibility focus on internal content

Bug: 209579561
Bug: 209579521
Bug: 209579162
Test: Manual
Change-Id: If65a74acf021b19438cdc37b07ac508985f8909a
parent a717d162
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:importantForAccessibility="no"
        android:importantForAccessibility="noHideDescendants"
        android:layout_marginVertical="8dp">
        <!-- The image of the widget. This view does not support padding. Any placement adjustment
             should be done using margins. Width & height are set at runtime after scaling the
+5 −5
Original line number Diff line number Diff line
@@ -21,7 +21,10 @@
    android:layout_height="wrap_content"
    android:paddingVertical="@dimen/widget_list_header_view_vertical_padding"
    android:orientation="horizontal"
    launcher:appIconSize="48dp">
    android:importantForAccessibility="yes"
    android:focusable="true"
    launcher:appIconSize="48dp"
    android:descendantFocusability="afterDescendants">

    <ImageView
        android:id="@+id/app_icon"
@@ -32,14 +35,11 @@
        tools:src="@drawable/ic_corp"/>

    <LinearLayout
        android:id="@+id/app_container"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_weight="1"
        android:orientation="vertical"
        android:focusable="true"
        android:descendantFocusability="afterDescendants">
        android:orientation="vertical">

        <TextView
            android:id="@+id/app_title"
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public final class WidgetsListHeader extends LinearLayout implements ItemInfoUpd
        mTitle = findViewById(R.id.app_title);
        mSubtitle = findViewById(R.id.app_subtitle);
        mExpandToggle = findViewById(R.id.toggle);
        findViewById(R.id.app_container).setAccessibilityDelegate(new AccessibilityDelegate() {
        setAccessibilityDelegate(new AccessibilityDelegate() {

            @Override
            public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {