Deactivate h/w keyboard when not an internal build.

The implementation is not really ready yet, so we want to
disable it for normal builds for now.
This goes together with Ic1edc6ed

Bug: 7987492
Change-Id: Id81f417e200c118f24424943823665f0b8bd6849
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 829c5e5..d9e63da 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2429,6 +2429,7 @@
     // 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 a14398f..f1e147f 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 @@
     // 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;
 }