From 18362e2c1ece17dc7c552be26f43490d229ae6aa Mon Sep 17 00:00:00 2001 From: alexmang Date: Tue, 16 Jun 2020 12:30:20 -0700 Subject: [PATCH] Fixing a11y bubble issues - activating manage focuses on first item in manage menu - scrimview no longer highlighted expanded bubble focus list - bubble now says double tap to activate Bug: 158811290 Bug: 158811563 Bug: 158811388 Test: manual Change-Id: I72f348d1407df6fe73103001145891d55b7537da --- .../src/com/android/systemui/bubbles/BadgedImageView.java | 1 + .../src/com/android/systemui/bubbles/BubbleController.java | 2 ++ .../src/com/android/systemui/bubbles/BubbleStackView.java | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java index 55be77ca3be54..a86a46960bcbe 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java @@ -100,6 +100,7 @@ public class BadgedImageView extends ImageView { mDotRenderer = new DotRenderer(mBubbleBitmapSize, iconPath, DEFAULT_PATH_SIZE); setFocusable(true); + setClickable(true); } /** diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index c4c5da42ec06d..35123c6b652c0 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -67,6 +67,7 @@ import android.util.Log; import android.util.Pair; import android.util.SparseSetArray; import android.view.Display; +import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; @@ -394,6 +395,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi : statusBarService; mBubbleScrim = new ScrimView(mContext); + mBubbleScrim.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); mSavedBubbleKeysPerUser = new SparseSetArray<>(); mCurrentUserId = mNotifUserManager.getCurrentUserId(); diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index 23bd174ac4a53..7590a19cdf054 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -2470,6 +2470,10 @@ public class BubbleStackView extends FrameLayout .spring(DynamicAnimation.SCALE_Y, 1f) .spring(DynamicAnimation.TRANSLATION_X, targetX) .spring(DynamicAnimation.TRANSLATION_Y, targetY) + .withEndActions(() -> { + View child = mManageMenu.getChildAt(0); + child.requestAccessibilityFocus(); + }) .start(); mManageMenu.setVisibility(View.VISIBLE);