From ecd0e1b2b12f7282d66f62e28c4486562b5687c4 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Thu, 7 Sep 2017 15:43:13 -0700 Subject: [PATCH] Changed the accessibility experience for notifications The expand button is now not labeling the notification anymore since it was too wordy. Change-Id: I14374b1a97389b8441fdf44eb4993954e765e89f Fixes: 65123834 Test: use talkback and navigate to expand button, verify not speaking notification anymore --- .../com/android/internal/widget/NotificationExpandButton.java | 8 -------- .../statusbar/notification/NotificationHeaderViewWrapper.java | 1 - 2 files changed, 9 deletions(-) diff --git a/core/java/com/android/internal/widget/NotificationExpandButton.java b/core/java/com/android/internal/widget/NotificationExpandButton.java index b7028980b314..39f82a5fb349 100644 --- a/core/java/com/android/internal/widget/NotificationExpandButton.java +++ b/core/java/com/android/internal/widget/NotificationExpandButton.java @@ -31,7 +31,6 @@ import android.widget.RemoteViews; */ @RemoteViews.RemoteView public class NotificationExpandButton extends ImageView { - private View mLabeledBy; public NotificationExpandButton(Context context) { super(context); @@ -69,12 +68,5 @@ public class NotificationExpandButton extends ImageView { public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(Button.class.getName()); - if (mLabeledBy != null) { - info.setLabeledBy(mLabeledBy); - } - } - - public void setLabeledBy(View labeledBy) { - mLabeledBy = labeledBy; } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java index fcc982ea3fb0..b95b8a392c86 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java @@ -114,7 +114,6 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper { mIcon = mView.findViewById(com.android.internal.R.id.icon); mHeaderText = mView.findViewById(com.android.internal.R.id.header_text); mExpandButton = mView.findViewById(com.android.internal.R.id.expand_button); - mExpandButton.setLabeledBy(mRow); mWorkProfileImage = mView.findViewById(com.android.internal.R.id.profile_badge); mColor = resolveColor(mExpandButton); mNotificationHeader = mView.findViewById(com.android.internal.R.id.notification_header); -- 2.11.0