aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/accessibility
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-05-26 11:09:07 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-06-04 19:45:38 +0900
commitaea429200e997762cd92744a2b1f3f586fc00b35 (patch)
tree4a8d20d40de114cf225bf7c4554b2f4ac9d16903 /java/src/com/android/inputmethod/accessibility
parent86e1e1f97cc12f7671ebe1386395ac99db6201ed (diff)
downloadlatinime-aea429200e997762cd92744a2b1f3f586fc00b35.tar.gz
latinime-aea429200e997762cd92744a2b1f3f586fc00b35.tar.xz
latinime-aea429200e997762cd92744a2b1f3f586fc00b35.zip
Support more suggestions accessibility mode
Bug: 12491371 Change-Id: Ib01452b6a2a53faa591b05e62014f356e0511308
Diffstat (limited to 'java/src/com/android/inputmethod/accessibility')
-rw-r--r--java/src/com/android/inputmethod/accessibility/MoreSuggestionsAccessibilityDelegate.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/MoreSuggestionsAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/MoreSuggestionsAccessibilityDelegate.java
new file mode 100644
index 000000000..dfc866113
--- /dev/null
+++ b/java/src/com/android/inputmethod/accessibility/MoreSuggestionsAccessibilityDelegate.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.accessibility;
+
+import android.view.MotionEvent;
+
+import com.android.inputmethod.keyboard.KeyDetector;
+import com.android.inputmethod.keyboard.MoreKeysKeyboardView;
+
+public final class MoreSuggestionsAccessibilityDelegate
+ extends MoreKeysKeyboardAccessibilityDelegate {
+ public MoreSuggestionsAccessibilityDelegate(final MoreKeysKeyboardView moreKeysKeyboardView,
+ final KeyDetector keyDetector) {
+ super(moreKeysKeyboardView, keyDetector);
+ }
+
+ @Override
+ protected void simulateTouchEvent(final int touchAction, final MotionEvent hoverEvent) {
+ final MotionEvent touchEvent = synthesizeTouchEvent(touchAction, hoverEvent);
+ mKeyboardView.onTouchEvent(touchEvent);
+ touchEvent.recycle();
+ }
+}