aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-08-13 09:14:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-13 09:14:37 +0000
commit7e34709a924800d569bdf3b1840e84ee4a511989 (patch)
treeb258346e6b06e4f9a188ce5ace5b1de80684d305 /java/src
parentbdb05cc89f63f4f3956936fa062d0b4555aa072a (diff)
parenta696c924776cea07ec52ed9448dd16d813eddd72 (diff)
downloadlatinime-7e34709a924800d569bdf3b1840e84ee4a511989.tar.gz
latinime-7e34709a924800d569bdf3b1840e84ee4a511989.tar.xz
latinime-7e34709a924800d569bdf3b1840e84ee4a511989.zip
am a696c924: (DO NOT MERGE) Add debug setting to force hardware special key
* commit 'a696c924776cea07ec52ed9448dd16d813eddd72': (DO NOT MERGE) Add debug setting to force hardware special key
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
-rw-r--r--java/src/com/android/inputmethod/latin/SpecialKeyDetector.java8
-rw-r--r--java/src/com/android/inputmethod/latin/settings/DebugSettings.java2
-rw-r--r--java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java3
4 files changed, 14 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 9b629ca14..91b01b506 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -155,7 +155,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@UsedForTesting final KeyboardSwitcher mKeyboardSwitcher;
private final SubtypeSwitcher mSubtypeSwitcher;
private final SubtypeState mSubtypeState = new SubtypeState();
- private final SpecialKeyDetector mSpecialKeyDetector = new SpecialKeyDetector();
+ private final SpecialKeyDetector mSpecialKeyDetector;
// Object for reacting to adding/removing a dictionary pack.
private final BroadcastReceiver mDictionaryPackInstallReceiver =
@@ -517,6 +517,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mSettings = Settings.getInstance();
mSubtypeSwitcher = SubtypeSwitcher.getInstance();
mKeyboardSwitcher = KeyboardSwitcher.getInstance();
+ mSpecialKeyDetector = new SpecialKeyDetector(this);
mIsHardwareAcceleratedDrawingEnabled =
InputMethodServiceCompatUtils.enableHardwareAcceleration(this);
Log.i(TAG, "Hardware accelerated drawing: " + mIsHardwareAcceleratedDrawingEnabled);
diff --git a/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java b/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java
index 9d6c69ae7..27b2f5012 100644
--- a/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java
@@ -16,10 +16,18 @@
package com.android.inputmethod.latin;
+import android.content.Context;
import android.view.KeyEvent;
final class SpecialKeyDetector {
/**
+ * Special physical key detector
+ * @param context a context of this detector.
+ */
+ public SpecialKeyDetector(final Context context) {
+ }
+
+ /**
* Record a down key event.
* @param keyEvent a down key event.
*/
diff --git a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
index dce11b434..bb3749da4 100644
--- a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
+++ b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
@@ -19,6 +19,8 @@ package com.android.inputmethod.latin.settings;
public final class DebugSettings {
public static final String PREF_DEBUG_MODE = "debug_mode";
public static final String PREF_FORCE_NON_DISTINCT_MULTITOUCH = "force_non_distinct_multitouch";
+ public static final String PREF_FORCE_PHYSICAL_KEYBOARD_SPECIAL_KEY =
+ "force_physical_keyboard_special_key";
public static final String PREF_KEY_PREVIEW_SHOW_UP_START_SCALE =
"pref_key_preview_show_up_start_scale";
public static final String PREF_KEY_PREVIEW_DISMISS_END_SCALE =
diff --git a/java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java
index 4e41d52a3..2139bb11c 100644
--- a/java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java
@@ -133,7 +133,8 @@ public final class DebugSettingsFragment extends SubScreenFragment
mServiceNeedsRestart = true;
return;
}
- if (key.equals(DebugSettings.PREF_FORCE_NON_DISTINCT_MULTITOUCH)) {
+ if (key.equals(DebugSettings.PREF_FORCE_NON_DISTINCT_MULTITOUCH)
+ || key.equals(DebugSettings.PREF_FORCE_PHYSICAL_KEYBOARD_SPECIAL_KEY)) {
mServiceNeedsRestart = true;
return;
}