aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-04-18 11:47:47 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-04-18 11:55:11 +0900
commit79e07e3f84ca4753c503a80f05993959c4fada76 (patch)
tree5d1b1ab1e73997cfd7f75692704e24efadcd550b /java/src
parent69bcc15cb386f0a2b56aed8a58ddb1468974c92d (diff)
downloadlatinime-79e07e3f84ca4753c503a80f05993959c4fada76.tar.gz
latinime-79e07e3f84ca4753c503a80f05993959c4fada76.tar.xz
latinime-79e07e3f84ca4753c503a80f05993959c4fada76.zip
Remove useless key event handling methods
Change-Id: I8c42fba79aba643ab7a145e6fd54ef23855a3ad0
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Keyboard.java8
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java4
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java45
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java4
4 files changed, 0 insertions, 61 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index d54acf715..fca8f56c8 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -197,14 +197,6 @@ public class Keyboard {
return null;
}
- // TODO: Remove this method.
- public boolean isShiftedOrShiftLocked() {
- // Alphabet mode have unshifted, manual shifted, automatic shifted, shift locked, and
- // shift lock shifted element. So that unshifed element is the only one that is NOT in
- // shifted or shift locked state.
- return mId.isAlphabetKeyboard() && mId.mElementId != KeyboardId.ELEMENT_ALPHABET;
- }
-
public static boolean isLetterCode(int code) {
return code >= MINIMUM_LETTER_CODE;
}
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 341d9bc7a..80a8c040c 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -790,10 +790,6 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
return false;
}
- public boolean handleBack() {
- return dismissMoreKeysPanel();
- }
-
@Override
public void draw(Canvas c) {
Utils.GCUtils.getInstance().reset();
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index ddf21f749..3c10c4ebf 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -40,7 +40,6 @@ import android.text.TextUtils;
import android.util.Log;
import android.util.PrintWriterPrinter;
import android.util.Printer;
-import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
@@ -1009,50 +1008,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mKeyPreviewBackingView.setVisibility(isFullscreenMode() ? View.GONE : View.VISIBLE);
}
- @Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- switch (keyCode) {
- case KeyEvent.KEYCODE_BACK:
- if (event.getRepeatCount() == 0) {
- if (mSuggestionsView != null && mSuggestionsView.handleBack()) {
- return true;
- }
- final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
- if (keyboardView != null && keyboardView.handleBack()) {
- return true;
- }
- }
- break;
- }
- return super.onKeyDown(keyCode, event);
- }
-
- @Override
- public boolean onKeyUp(int keyCode, KeyEvent event) {
- switch (keyCode) {
- case KeyEvent.KEYCODE_DPAD_DOWN:
- case KeyEvent.KEYCODE_DPAD_UP:
- case KeyEvent.KEYCODE_DPAD_LEFT:
- case KeyEvent.KEYCODE_DPAD_RIGHT:
- final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
- final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
- // Enable shift key and DPAD to do selections
- if ((keyboardView != null && keyboardView.isShown())
- && (keyboard != null && keyboard.isShiftedOrShiftLocked())) {
- KeyEvent newEvent = new KeyEvent(event.getDownTime(), event.getEventTime(),
- event.getAction(), event.getKeyCode(), event.getRepeatCount(),
- event.getDeviceId(), event.getScanCode(),
- KeyEvent.META_SHIFT_LEFT_ON | KeyEvent.META_SHIFT_ON);
- final InputConnection ic = getCurrentInputConnection();
- if (ic != null)
- ic.sendKeyEvent(newEvent);
- return true;
- }
- break;
- }
- return super.onKeyUp(keyCode, event);
- }
-
// This will reset the whole input state to the starting state. It will clear
// the composing word, reset the last composed word, tell the inputconnection
// and the composingStateManager about it.
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index 4e1410415..a17371396 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -746,10 +746,6 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
return false;
}
- public boolean handleBack() {
- return dismissMoreSuggestions();
- }
-
@Override
public boolean onLongClick(View view) {
return showMoreSuggestions();