aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-11-18 09:15:52 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-18 09:15:52 -0800
commit18630d5fd681ab853befe7fffb67e3db9c9ea0f1 (patch)
tree6f64744bf6b95379b41fc9b818e72606fbbfcf45 /java/src/com/android/inputmethod
parent49cc3beb75e2916037a0f8ff2d2795f306918598 (diff)
parent15a01d72724ce7f0a9a5814443a03b907962f3fd (diff)
downloadlatinime-18630d5fd681ab853befe7fffb67e3db9c9ea0f1.tar.gz
latinime-18630d5fd681ab853befe7fffb67e3db9c9ea0f1.tar.xz
latinime-18630d5fd681ab853befe7fffb67e3db9c9ea0f1.zip
am 15a01d72: Merge "Do not show key preview of settings and shortcut key" into ics-mr1
* commit '15a01d72724ce7f0a9a5814443a03b907962f3fd': Do not show key preview of settings and shortcut key
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java7
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java8
2 files changed, 6 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index d5986aa32..5673bfc50 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -354,9 +354,12 @@ public class PointerTracker {
// The modifier key, such as shift key, should not show its key preview.
private static boolean isKeyPreviewRequired(Key key) {
final int code = key.mCode;
- if (isModifierCode(code) || code == Keyboard.CODE_DELETE
- || code == Keyboard.CODE_ENTER || code == Keyboard.CODE_SPACE)
+ // TODO: Stop hard-coding these key codes here, and add a new key attribute of a key.
+ if (code == Keyboard.CODE_SPACE || code == Keyboard.CODE_ENTER
+ || code == Keyboard.CODE_DELETE || isModifierCode(code)
+ || code == Keyboard.CODE_SETTINGS || code == Keyboard.CODE_SHORTCUT) {
return false;
+ }
return true;
}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
index 2d8b7bf11..faa5f86f2 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
@@ -42,10 +42,8 @@ public class KeyboardIconsSet {
private static final int ICON_SHIFTED_SHIFT_KEY = 10;
// This should be aligned with Keyboard.keyIconPreview enum.
private static final int ICON_PREVIEW_TAB_KEY = 11;
- private static final int ICON_PREVIEW_SETTINGS_KEY = 12;
- private static final int ICON_PREVIEW_SHORTCUT_KEY = 13;
- private static final int ICON_LAST = 13;
+ private static final int ICON_LAST = 11;
private final Drawable mIcons[] = new Drawable[ICON_LAST + 1];
@@ -73,10 +71,6 @@ public class KeyboardIconsSet {
return ICON_SHIFTED_SHIFT_KEY;
case R.styleable.Keyboard_iconPreviewTabKey:
return ICON_PREVIEW_TAB_KEY;
- case R.styleable.Keyboard_iconPreviewSettingsKey:
- return ICON_PREVIEW_SETTINGS_KEY;
- case R.styleable.Keyboard_iconPreviewShortcutKey:
- return ICON_PREVIEW_SHORTCUT_KEY;
default:
return ICON_UNDEFINED;
}