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

Commit 25251581 authored by Marcus Hagerott's avatar Marcus Hagerott
Browse files

Fix talkback when tapping on disabled SIM contacts

Test
manually tap on disabled contact with Talkback on and verify that
snackbar is announced

Bug 31781331

Change-Id: I202349a5f7879f3446c632154ab7d9aa50eaacd6
parent 6130a3b0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -63,8 +63,8 @@
                android:id="@+id/list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingTop="8dp"
                android:clipToPadding="false"/>
                android:clipToPadding="false"
                android:paddingTop="8dp"/>

            <android.support.v4.widget.ContentLoadingProgressBar
                android:id="@+id/loading_progress"
+6 −0
Original line number Diff line number Diff line
@@ -391,6 +391,12 @@ public class SimImportFragment extends DialogFragment
        private void setViewEnabled(ContactListItemView itemView, boolean enabled) {
            itemView.getCheckBox().setEnabled(enabled);
            itemView.getNameTextView().setEnabled(enabled);
            // If the checkbox is left to default it's "unchecked" state will be announced when
            // it is clicked on instead of the snackbar which is not useful.
            int accessibilityMode = enabled ?
                    View.IMPORTANT_FOR_ACCESSIBILITY_YES :
                    View.IMPORTANT_FOR_ACCESSIBILITY_NO;
            itemView.getCheckBox().setImportantForAccessibility(accessibilityMode);
        }
    }