aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-09-22 22:57:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-22 22:57:15 -0700
commit48ef8f4a252ebe7f6fa4800b1eea15c37993625d (patch)
treeefb25225051693358b1220a58b5bee9acefd7d34 /java/src/com/android/inputmethod/latin/LatinIME.java
parentfc66213d9efb4c5b22e6105d83665576ef4a66f1 (diff)
parenta8f77c36ca985cb356b03b25f5cd30fd3b25dc9a (diff)
downloadlatinime-48ef8f4a252ebe7f6fa4800b1eea15c37993625d.tar.gz
latinime-48ef8f4a252ebe7f6fa4800b1eea15c37993625d.tar.xz
latinime-48ef8f4a252ebe7f6fa4800b1eea15c37993625d.zip
am a8f77c36: am 23f7fb03: Merge "Disable invoking VoiceIME using swipe right action" into gingerbread
Merge commit 'a8f77c36ca985cb356b03b25f5cd30fd3b25dc9a' * commit 'a8f77c36ca985cb356b03b25f5cd30fd3b25dc9a': Disable invoking VoiceIME using swipe right action
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java42
1 files changed, 11 insertions, 31 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 7fa763c5e..64f3b8746 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -133,12 +133,7 @@ public class LatinIME extends InputMethodService
private static final int MSG_START_TUTORIAL = 1;
private static final int MSG_UPDATE_SHIFT_STATE = 2;
private static final int MSG_VOICE_RESULTS = 3;
- private static final int MSG_START_LISTENING_AFTER_SWIPE = 4;
- private static final int MSG_UPDATE_OLD_SUGGESTIONS = 5;
-
- // If we detect a swipe gesture within N ms of typing, then swipe is
- // ignored, since it may in fact be two key presses in quick succession.
- private static final long MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE = 1000;
+ private static final int MSG_UPDATE_OLD_SUGGESTIONS = 4;
// How many continuous deletes at which to start deleting at a higher speed.
private static final int DELETE_ACCELERATE_AT = 20;
@@ -244,7 +239,6 @@ public class LatinIME extends InputMethodService
private String mSuggestPuncs;
private VoiceInput mVoiceInput;
private VoiceResults mVoiceResults = new VoiceResults();
- private long mSwipeTriggerTimeMillis;
private boolean mConfigurationChanging;
// Keeps track of most recently inserted text (multi-character key) for reverting
@@ -338,10 +332,6 @@ public class LatinIME extends InputMethodService
case MSG_VOICE_RESULTS:
handleVoiceResults();
break;
- case MSG_START_LISTENING_AFTER_SWIPE:
- if (mLastKeyTime < mSwipeTriggerTimeMillis) {
- startListening(true);
- }
}
}
};
@@ -2186,21 +2176,6 @@ public class LatinIME extends InputMethodService
return mWord.isCapitalized();
}
- public void swipeRight() {
- if (userHasNotTypedRecently() && VOICE_INSTALLED && mEnableVoice &&
- fieldCanDoVoice(makeFieldContext())) {
- startListening(true /* was a swipe */);
- }
-
- if (LatinKeyboardView.DEBUG_AUTO_PLAY) {
- ClipboardManager cm = ((ClipboardManager)getSystemService(CLIPBOARD_SERVICE));
- CharSequence text = cm.getText();
- if (!TextUtils.isEmpty(text)) {
- mKeyboardSwitcher.getInputView().startPlaying(text.toString());
- }
- }
- }
-
private void toggleLanguage(boolean reset, boolean next) {
if (reset) {
mLanguageSwitcher.reset();
@@ -2232,6 +2207,16 @@ public class LatinIME extends InputMethodService
}
}
+ public void swipeRight() {
+ if (LatinKeyboardView.DEBUG_AUTO_PLAY) {
+ ClipboardManager cm = ((ClipboardManager)getSystemService(CLIPBOARD_SERVICE));
+ CharSequence text = cm.getText();
+ if (!TextUtils.isEmpty(text)) {
+ mKeyboardSwitcher.getInputView().startPlaying(text.toString());
+ }
+ }
+ }
+
public void swipeLeft() {
}
@@ -2314,11 +2299,6 @@ public class LatinIME extends InputMethodService
}
}
- private boolean userHasNotTypedRecently() {
- return (SystemClock.uptimeMillis() - mLastKeyTime)
- > MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE;
- }
-
private void playKeyClick(int primaryCode) {
// if mAudioManager is null, we don't have the ringer state yet
// mAudioManager will be set by updateRingerMode