Fix clickable notification row elements
- Don't mark notification guts as clickable. Originally they were marked as clickable so that the guts wouldn't send touches to trigger the ExpandableNotificationRow's click, NotificationClicker. This caused talkback to speak "Double-tap to activate" when announcing the NotificationGuts even though double-tapping would do nothing. - Instead, added logic in NotificationClicker to ignore clicks that occur when the guts are exposed. Test: manual Fixes: 140398522 Change-Id: I806051ffd43ed27c38e804fdc43e2c2d3522566c
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:id="@+id/app_ops_info"
|
||||
android:clickable="true"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/notification_guts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="true"
|
||||
android:orientation="vertical"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:id="@+id/notification_guts"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:gravity="top|start"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/notification_guts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="true"
|
||||
android:orientation="vertical"
|
||||
|
||||
@@ -75,6 +75,9 @@ public final class NotificationClicker implements View.OnClickListener {
|
||||
// We never want to open the app directly if the user clicks in between
|
||||
// the notifications.
|
||||
return;
|
||||
} else if (row.areGutsExposed()) {
|
||||
// ignore click if guts are exposed
|
||||
return;
|
||||
}
|
||||
|
||||
// Mark notification for one frame.
|
||||
|
||||
Reference in New Issue
Block a user