diff --git a/java/res/drawable-hdpi/mic_slash_holo.png b/java/res/drawable-hdpi/mic_slash_holo.png
new file mode 100644
index 000000000..8108b6e13
Binary files /dev/null and b/java/res/drawable-hdpi/mic_slash_holo.png differ
diff --git a/java/res/values/keycodes.xml b/java/res/values/keycodes.xml
index 54fa61026..6c18cb42a 100644
--- a/java/res/values/keycodes.xml
+++ b/java/res/values/keycodes.xml
@@ -19,13 +19,13 @@
-->
+
9
10
32
-1
-2
-5
-
-100
-102
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index bd17bd289..78de94f95 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -410,7 +410,7 @@
Serbian Keyboard
Swedish Keyboard
- Czech Voice
+ Czech Voice
German Voice
English (Australia) Voice
English (Great Britain) Voice
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index 380198663..6a1d62efe 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -59,25 +59,26 @@ public class Keyboard {
public static final int EDGE_TOP = 0x04;
public static final int EDGE_BOTTOM = 0x08;
+ /** Some common keys code. These should be aligned with values/keycodes.xml */
public static final int CODE_ENTER = '\n';
public static final int CODE_TAB = '\t';
public static final int CODE_SPACE = ' ';
public static final int CODE_PERIOD = '.';
+ /** Special keys code. These should be aligned with values/keycodes.xml */
public static final int CODE_SHIFT = -1;
- public static final int CODE_MODE_CHANGE = -2;
+ public static final int CODE_SWITCH_ALPHA_SYMBOL = -2;
public static final int CODE_CANCEL = -3;
public static final int CODE_DONE = -4;
public static final int CODE_DELETE = -5;
public static final int CODE_ALT = -6;
-
- public static final int CODE_OPTIONS = -100;
- public static final int CODE_OPTIONS_LONGPRESS = -101;
+ public static final int CODE_SETTINGS = -100;
+ public static final int CODE_SETTINGS_LONGPRESS = -101;
+ // TODO: remove this once LatinIME stops referring to this.
+ public static final int CODE_VOICE = -102;
public static final int CODE_CAPSLOCK = -103;
public static final int CODE_NEXT_LANGUAGE = -104;
public static final int CODE_PREV_LANGUAGE = -105;
- // TODO: remove this once LatinIME stops referring to this.
- public static final int CODE_VOICE = -109;
/** Horizontal gap default for all rows */
private int mDefaultHorizontalGap;
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 4e0caa1f6..5c1c62b05 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -88,8 +88,8 @@ public class LatinKeyboardView extends KeyboardView {
@Override
protected boolean onLongPress(Key key) {
int primaryCode = key.mCodes[0];
- if (primaryCode == Keyboard.CODE_OPTIONS) {
- return invokeOnKey(Keyboard.CODE_OPTIONS_LONGPRESS);
+ if (primaryCode == Keyboard.CODE_SETTINGS) {
+ return invokeOnKey(Keyboard.CODE_SETTINGS_LONGPRESS);
} else if (primaryCode == '0' && getLatinKeyboard().isPhoneKeyboard()) {
// Long pressing on 0 in phone number keypad gives you a '+'.
return invokeOnKey('+');
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index a1210f240..8570491f8 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -208,7 +208,7 @@ public class PointerTracker {
return false;
int primaryCode = key.mCodes[0];
return primaryCode == Keyboard.CODE_SHIFT
- || primaryCode == Keyboard.CODE_MODE_CHANGE;
+ || primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL;
}
public boolean isModifier() {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 5bf635fd3..702731e6d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1050,7 +1050,7 @@ public class LatinIME extends InputMethodService
}
}
- private void onOptionKeyPressed() {
+ private void onSettingsKeyPressed() {
if (!isShowingOptionDialog()) {
if (LatinIMEUtil.hasMultipleEnabledIMEsOrSubtypes(mImm)) {
showOptionsMenu();
@@ -1060,7 +1060,7 @@ public class LatinIME extends InputMethodService
}
}
- private void onOptionKeyLongPressed() {
+ private void onSettingsKeyLongPressed() {
if (!isShowingOptionDialog()) {
if (LatinIMEUtil.hasMultipleEnabledIMEsOrSubtypes(mImm)) {
mImm.showInputMethodPicker();
@@ -1096,7 +1096,7 @@ public class LatinIME extends InputMethodService
if (!distinctMultiTouch)
switcher.toggleShift();
break;
- case Keyboard.CODE_MODE_CHANGE:
+ case Keyboard.CODE_SWITCH_ALPHA_SYMBOL:
// Symbol key is handled in onPress() when device has distinct multi-touch panel.
if (!distinctMultiTouch)
switcher.changeKeyboardMode();
@@ -1106,11 +1106,11 @@ public class LatinIME extends InputMethodService
handleClose();
}
break;
- case Keyboard.CODE_OPTIONS:
- onOptionKeyPressed();
+ case Keyboard.CODE_SETTINGS:
+ onSettingsKeyPressed();
break;
- case Keyboard.CODE_OPTIONS_LONGPRESS:
- onOptionKeyLongPressed();
+ case Keyboard.CODE_SETTINGS_LONGPRESS:
+ onSettingsKeyLongPressed();
break;
case Keyboard.CODE_NEXT_LANGUAGE:
toggleLanguage(false, true);
@@ -1929,7 +1929,7 @@ public class LatinIME extends InputMethodService
final boolean distinctMultiTouch = switcher.hasDistinctMultitouch();
if (distinctMultiTouch && primaryCode == Keyboard.CODE_SHIFT) {
switcher.onPressShift();
- } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_MODE_CHANGE) {
+ } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) {
switcher.onPressSymbol();
} else {
switcher.onOtherKeyPressed();
@@ -1944,7 +1944,7 @@ public class LatinIME extends InputMethodService
final boolean distinctMultiTouch = switcher.hasDistinctMultitouch();
if (distinctMultiTouch && primaryCode == Keyboard.CODE_SHIFT) {
switcher.onReleaseShift();
- } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_MODE_CHANGE) {
+ } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) {
switcher.onReleaseSymbol();
}
}