Disable double-tap accessibility action for a widget cell
Before this CL, the cell had 3 announced actions:
1. Add to home screen (a custom action)
2. "Double-tap to activate" - performing this action instructed the user
to use action #3
3. "Double-tap and hold for long press" - starts dragging the widget.
Bug: 116018969
Test: Manual
Change-Id: Ie2378ccb13d182a2558f70f7250055bf86c5e5f6
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index 66af43a..dc4af8c 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -26,6 +26,7 @@
import android.view.View.OnLayoutChangeListener;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -236,4 +237,10 @@
public CharSequence getAccessibilityClassName() {
return WidgetCell.class.getName();
}
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.removeAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_CLICK);
+ }
}