diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2012-07-19 12:33:51 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2012-07-19 16:33:09 +0900 |
| commit | 918e420d1becc1389b9895538eceff85fe882c99 (patch) | |
| tree | e8ee6c97574f51a469c18c6fc5042fa2ebeb85ec /java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java | |
| parent | 57f7de0ba664187e13bcea5adff7f5f65eddd823 (diff) | |
Gesture input should be turned off depending on the configuration
The gesture input will be disabled when
* It is AOSP build.
* Accessibility mode is on.
* The input field is password mode.
Bug: 6844755
Bug: 6844763
Bug: 6845011
Change-Id: I74972cc765d15c08059e0c9014f863ffb2a57c6c
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java index 7714ba892..1eae2c1d4 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java @@ -341,10 +341,14 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke mHasDistinctMultitouch = context.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT); + final Resources res = getResources(); final boolean needsPhantomSuddenMoveEventHack = Boolean.parseBoolean( - Utils.getDeviceOverrideValue(context.getResources(), + Utils.getDeviceOverrideValue(res, R.array.phantom_sudden_move_event_device_list, "false")); - PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack); + final boolean gestureInputEnabledByBuildConfig = res.getBoolean( + R.bool.config_gesture_input_enabled_by_build_config); + PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack, + gestureInputEnabledByBuildConfig); final TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.LatinKeyboardView, defStyle, R.style.LatinKeyboardView); |
