diff options
author | 2013-01-18 11:28:23 +0000 | |
---|---|---|
committer | 2013-01-18 11:28:24 +0000 | |
commit | fd80d1ad482b7ee9d6dcdb3f4463bdf0d2bf2bfb (patch) | |
tree | 0a3eb194b03ba5e97abfb9c8cc6ca75e65b7f21e /java/src | |
parent | 2e680c890d198f2f32d4ae1a46b0431b61227db2 (diff) | |
parent | 2fc4d422e72cf88bd4b0e30bce2a9815b7856b8e (diff) | |
download | latinime-fd80d1ad482b7ee9d6dcdb3f4463bdf0d2bf2bfb.tar.gz latinime-fd80d1ad482b7ee9d6dcdb3f4463bdf0d2bf2bfb.tar.xz latinime-fd80d1ad482b7ee9d6dcdb3f4463bdf0d2bf2bfb.zip |
Merge "Deactivate h/w keyboard when not an internal build."
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 1 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/define/ProductionFlag.java | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 829c5e53d..d9e63da1b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2429,6 +2429,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction // Hooks for hardware keyboard @Override public boolean onKeyDown(final int keyCode, final KeyEvent event) { + if (!ProductionFlag.IS_HARDWARE_KEYBOARD_SUPPORTED) return super.onKeyDown(keyCode, event); // onHardwareKeyEvent, like onKeyDown returns true if it handled the event, false if // it doesn't know what to do with it and leave it to the application. For example, // hardware key events for adjusting the screen's brightness are passed as is. diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java index a14398f64..f1e147fe5 100644 --- a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java +++ b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java @@ -28,4 +28,6 @@ public final class ProductionFlag { // be false, and any privacy controls should be enforced. IS_EXPERIMENTAL_DEBUG should be false // for any released build. public static final boolean IS_EXPERIMENTAL_DEBUG = false; + + public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = true; } |