aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/settings
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/settings')
-rw-r--r--java/src/com/android/inputmethod/latin/settings/NativeSuggestOptions.java7
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java30
2 files changed, 36 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/NativeSuggestOptions.java b/java/src/com/android/inputmethod/latin/settings/NativeSuggestOptions.java
index 04a2ee3ce..31a20c4db 100644
--- a/java/src/com/android/inputmethod/latin/settings/NativeSuggestOptions.java
+++ b/java/src/com/android/inputmethod/latin/settings/NativeSuggestOptions.java
@@ -21,7 +21,8 @@ public class NativeSuggestOptions {
private static final int IS_GESTURE = 0;
private static final int USE_FULL_EDIT_DISTANCE = 1;
private static final int BLOCK_OFFENSIVE_WORDS = 2;
- private static final int OPTIONS_SIZE = 3;
+ private static final int SPACE_AWARE_GESTURE_ENABLED = 3;
+ private static final int OPTIONS_SIZE = 4;
private final int[] mOptions = new int[OPTIONS_SIZE
+ AdditionalFeaturesSettingUtils.ADDITIONAL_FEATURES_SETTINGS_SIZE];
@@ -38,6 +39,10 @@ public class NativeSuggestOptions {
setBooleanOption(BLOCK_OFFENSIVE_WORDS, value);
}
+ public void setSpaceAwareGestureEnabled(final boolean value) {
+ setBooleanOption(SPACE_AWARE_GESTURE_ENABLED, value);
+ }
+
public void setAdditionalFeaturesOptions(final int[] additionalOptions) {
if (additionalOptions == null) {
return;
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java b/java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java
new file mode 100644
index 000000000..d80af4ba7
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin.settings;
+
+public class SettingsValuesForSuggestion {
+ public final boolean mBlockPotentiallyOffensive;
+ public final boolean mSpaceAwareGestureEnabled;
+ public final int[] mAdditionalFeaturesSettingValues;
+
+ public SettingsValuesForSuggestion(final boolean blockPotentiallyOffensive,
+ final boolean spaceAwareGestureEnabled, final int[] additionalFeaturesSettingValues) {
+ mBlockPotentiallyOffensive = blockPotentiallyOffensive;
+ mSpaceAwareGestureEnabled = spaceAwareGestureEnabled;
+ mAdditionalFeaturesSettingValues = additionalFeaturesSettingValues;
+ }
+}