summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardSet.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSet.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
index 52096c843..bb11a9b77 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
@@ -63,8 +63,6 @@ public class KeyboardSet {
new HashMap<KeyboardId, SoftReference<Keyboard>>();
private static final KeysCache sKeysCache = new KeysCache();
- private static final EditorInfo EMPTY_EDITOR_INFO = new EditorInfo();
-
public static class KeyboardSetException extends RuntimeException {
public final KeyboardId mKeyboardId;
public KeyboardSetException(Throwable cause, KeyboardId keyboardId) {
@@ -209,6 +207,8 @@ public class KeyboardSet {
private final Params mParams = new Params();
+ private static final EditorInfo EMPTY_EDITOR_INFO = new EditorInfo();
+
public Builder(Context context, EditorInfo editorInfo) {
mContext = context;
mPackageName = context.getPackageName();
@@ -229,15 +229,13 @@ public class KeyboardSet {
}
// TODO: Use InputMethodSubtype object as argument.
- public Builder setSubtype(Locale inputLocale, boolean asciiCapable,
- boolean touchPositionCorrectionEnabled) {
+ public Builder setSubtype(Locale inputLocale, boolean asciiCapable) {
final boolean deprecatedForceAscii = StringUtils.inPrivateImeOptions(
mPackageName, LatinIME.IME_OPTION_FORCE_ASCII, mEditorInfo);
final boolean forceAscii = EditorInfoCompatUtils.hasFlagForceAscii(
mParams.mEditorInfo.imeOptions)
|| deprecatedForceAscii;
mParams.mLocale = (forceAscii && !asciiCapable) ? Locale.US : inputLocale;
- mParams.mTouchPositionCorrectionEnabled = touchPositionCorrectionEnabled;
return this;
}
@@ -255,6 +253,10 @@ public class KeyboardSet {
return this;
}
+ public void setTouchPositionCorrectionEnabled(boolean enabled) {
+ mParams.mTouchPositionCorrectionEnabled = enabled;
+ }
+
public KeyboardSet build() {
if (mParams.mOrientation == Configuration.ORIENTATION_UNDEFINED)
throw new RuntimeException("Screen geometry is not specified");