diff options
author | 2019-12-04 00:45:51 -0800 | |
---|---|---|
committer | 2019-12-04 00:45:51 -0800 | |
commit | 3721623175bf6f7122a131eea42613a9e818800c (patch) | |
tree | c422d2c92c07c4e138fccc77143f5e55a49f68bd /java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java | |
parent | e8d02cca96d7d948566e12f32728d799bdc815af (diff) | |
parent | c3eafcb75631a52b32ea6785ba7791486770ad2b (diff) | |
download | latinime-3721623175bf6f7122a131eea42613a9e818800c.tar.gz latinime-3721623175bf6f7122a131eea42613a9e818800c.tar.xz latinime-3721623175bf6f7122a131eea42613a9e818800c.zip |
Merge "Implement text entry key API for accessibility services in AOSP Keyboard"
am: c3eafcb756
Change-Id: Ib5e707d2fa6a6ea23e1d8ca1aae13b9c296efbb5
Diffstat (limited to 'java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java')
-rw-r--r-- | java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java index a3511c63f..7266aa88a 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java +++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java @@ -236,6 +236,7 @@ final class KeyboardAccessibilityNodeProvider<KV extends KeyboardView> // Obtain and initialize an AccessibilityNodeInfo with information about the virtual view. final AccessibilityNodeInfoCompat info = AccessibilityNodeInfoCompat.obtain(); info.setPackageName(mKeyboardView.getContext().getPackageName()); + info.setTextEntryKey(true); info.setClassName(key.getClass().getName()); info.setContentDescription(keyDescription); info.setBoundsInParent(boundsInParent); @@ -244,13 +245,9 @@ final class KeyboardAccessibilityNodeProvider<KV extends KeyboardView> info.setSource(mKeyboardView, virtualViewId); info.setEnabled(key.isEnabled()); info.setVisibleToUser(true); - // Don't add ACTION_CLICK and ACTION_LONG_CLOCK actions while hovering on the key. - // See {@link #onHoverEnterTo(Key)} and {@link #onHoverExitFrom(Key)}. - if (virtualViewId != mHoveringNodeId) { - info.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK); - if (key.isLongPressEnabled()) { - info.addAction(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK); - } + info.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK); + if (key.isLongPressEnabled()) { + info.addAction(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK); } if (mAccessibilityFocusedView == virtualViewId) { |