Let ContactTileRow ignore accessibility event
When "explore by touch" is turned on and a user clicks empty area
in contact tile section, tts speaks a contact name next to the
empty area. This happens because ContactTileRow tries to obtain
some meaningful information from the invalid tile next to the
empty space. This change forces the row to ignore accesibility
event.
Bug: 5559634
Change-Id: I7a994c38411c9d551400cd79eb9edb80abb324b3
diff --git a/src/com/android/contacts/list/ContactTileAdapter.java b/src/com/android/contacts/list/ContactTileAdapter.java
index 27ce433..490cd92 100644
--- a/src/com/android/contacts/list/ContactTileAdapter.java
+++ b/src/com/android/contacts/list/ContactTileAdapter.java
@@ -637,6 +637,14 @@
}
setMeasuredDimension(width, imageSize + getChildAt(0).getPaddingBottom());
}
+
+ @Override
+ public void sendAccessibilityEvent(int eventType) {
+ // This method is called when the child tile is INVISIBLE (meaning "empty"), and the
+ // Accessibility Manager needs to find alternative content description to speak.
+ // Here, we ignore the default behavior, since we don't want to let the manager speak
+ // a contact name for the tile next to the INVISIBLE tile.
+ }
}
/**