summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2019-06-21 12:50:30 -0700
committerAdam Cohen <adamcohen@google.com>2019-06-21 12:56:36 -0700
commit29794c56a4ffbae6b1f1b420a619877d1da0c4bb (patch)
tree7e13e16f7fce0a3eec1e7421bd2afc02d6551001
parent04414bba47eb4f223e37724028e274b9099ddc73 (diff)
downloadandroid_packages_apps_Trebuchet-29794c56a4ffbae6b1f1b420a619877d1da0c4bb.tar.gz
android_packages_apps_Trebuchet-29794c56a4ffbae6b1f1b420a619877d1da0c4bb.tar.bz2
android_packages_apps_Trebuchet-29794c56a4ffbae6b1f1b420a619877d1da0c4bb.zip
Workaround issue with latest version of RecyclerView which is overriding our custom accessibility delegate
-> Not the prettiest fix, but we only ever use the LauncherAccessibilityDelegate for BubbleTextViews,so anything else getting set here is incorrect. Stop-gap until we root cause the RV issue and decide whether there's a fix there, or a better way to ensure Launcher behaves correctly. issue 129745295 Change-Id: I27cf79fda9edc2bebeda4728b776ab292caa141d
-rw-r--r--src/com/android/launcher3/BubbleTextView.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 7085c6052..1619e3645 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -43,6 +43,7 @@ import android.view.ViewDebug;
import android.widget.TextView;
import com.android.launcher3.Launcher.OnResumeCallback;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.dot.DotInfo;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.DrawableFactory;
@@ -227,6 +228,18 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
applyFromWorkspaceItem(info, false);
}
+ @Override
+ public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
+ if (delegate instanceof LauncherAccessibilityDelegate) {
+ super.setAccessibilityDelegate(delegate);
+ } else {
+ // NO-OP
+ // Workaround for b/129745295 where RecyclerView is setting our Accessibility
+ // delegate incorrectly. There are no cases when we shouldn't be using the
+ // LauncherAccessibilityDelegate for BubbleTextView.
+ }
+ }
+
public void applyFromWorkspaceItem(WorkspaceItemInfo info, boolean promiseStateChanged) {
applyIconAndLabel(info);
setTag(info);