aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/MainKeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/MainKeyboardView.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 86036ccc1..f291a7ed0 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -57,7 +57,6 @@ import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.DebugSettings;
-import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.SpacebarLanguageUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
@@ -150,8 +149,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private final Paint mBackgroundDimAlphaPaint = new Paint();
private boolean mNeedsToDimEntireKeyboard;
private final View mMoreKeysKeyboardContainer;
- private final WeakHashMap<Key, Keyboard> mMoreKeysKeyboardCache =
- CollectionUtils.newWeakHashMap();
+ private final WeakHashMap<Key, Keyboard> mMoreKeysKeyboardCache = new WeakHashMap<>();
private final boolean mConfigShowMoreKeysKeyboardAtTouchedPoint;
// More keys panel (used by both more keys keyboard and more suggestions view)
// TODO: Consider extending to support multiple more keys panels
@@ -765,19 +763,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
}
/**
- * Receives hover events from the input framework.
- *
- * @param event The motion event to be dispatched.
- * @return {@code true} if the event was handled by the view, {@code false}
- * otherwise
+ * {@inheritDoc}
*/
@Override
- public boolean dispatchHoverEvent(final MotionEvent event) {
- if (!AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
- // Reflection doesn't support calling superclass methods.
- return false;
+ public boolean onHoverEvent(final MotionEvent event) {
+ if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
+ return mAccessibilityDelegate.onHoverEvent(event);
}
- return mAccessibilityDelegate.dispatchHoverEvent(event);
+ return super.onHoverEvent(event);
}
public void updateShortcutKey(final boolean available) {