diff options
author | 2010-09-06 14:26:46 +0900 | |
---|---|---|
committer | 2010-09-06 17:57:13 +0900 | |
commit | c8b9afe0378e3f33c3f83271bd1df9678a70c2a2 (patch) | |
tree | 51cedfdaa1869388f5bdf99f81cf74506dca54cd /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | a8d9702fc4782206ea45c53109132138f9e04c18 (diff) | |
download | latinime-c8b9afe0378e3f33c3f83271bd1df9678a70c2a2.tar.gz latinime-c8b9afe0378e3f33c3f83271bd1df9678a70c2a2.tar.xz latinime-c8b9afe0378e3f33c3f83271bd1df9678a70c2a2.zip |
Support multi-touch only when device has distinct multi-touch panel
Bug: 2973373
Change-Id: I9871c09ec8c1c2aa945d97392e61ee1ec585baef
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index ea8c93934..2cff232a6 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1135,7 +1135,9 @@ public class LatinIME extends InputMethodService LatinImeLogger.logOnDelete(); break; case Keyboard.KEYCODE_SHIFT: - // Shift key is handled in onPress(). + // Shift key is handled in onPress() when device has distinct multi-touch panel. + if (!mKeyboardSwitcher.hasDistinctMultitouch()) + handleShift(); break; case Keyboard.KEYCODE_CANCEL: if (!isShowingOptionDialog()) { @@ -1935,7 +1937,7 @@ public class LatinIME extends InputMethodService List<CharSequence> suggestions = mWordToSuggestions.get(selectedWord); // If the first letter of touching is capitalized, make all the suggestions // start with a capital letter. - if (Character.isUpperCase((char) touching.word.charAt(0))) { + if (Character.isUpperCase(touching.word.charAt(0))) { for (int i = 0; i < suggestions.size(); i++) { String origSugg = (String) suggestions.get(i); String capsSugg = origSugg.toUpperCase().charAt(0) @@ -2196,7 +2198,7 @@ public class LatinIME extends InputMethodService public void onPress(int primaryCode) { vibrate(); playKeyClick(primaryCode); - if (primaryCode == Keyboard.KEYCODE_SHIFT) { + if (mKeyboardSwitcher.hasDistinctMultitouch() && primaryCode == Keyboard.KEYCODE_SHIFT) { mShiftKeyState.onPress(); handleShift(); } else if (primaryCode == Keyboard.KEYCODE_MODE_CHANGE) { @@ -2210,7 +2212,7 @@ public class LatinIME extends InputMethodService // Reset any drag flags in the keyboard ((LatinKeyboard) mKeyboardSwitcher.getInputView().getKeyboard()).keyReleased(); //vibrate(); - if (primaryCode == Keyboard.KEYCODE_SHIFT) { + if (mKeyboardSwitcher.hasDistinctMultitouch() && primaryCode == Keyboard.KEYCODE_SHIFT) { if (mShiftKeyState.isMomentary()) resetShift(); mShiftKeyState.onRelease(); |