OSDN Git Service

Changed the accessibility experience for notifications
authorSelim Cinek <cinek@google.com>
Thu, 7 Sep 2017 22:43:13 +0000 (15:43 -0700)
committerSelim Cinek <cinek@google.com>
Thu, 7 Sep 2017 22:45:27 +0000 (15:45 -0700)
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

core/java/com/android/internal/widget/NotificationExpandButton.java
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java

index b702898..39f82a5 100644 (file)
@@ -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;
     }
 }
index fcc982e..b95b8a3 100644 (file)
@@ -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);