aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dicttool/compat/com/android/inputmethod
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dicttool/compat/com/android/inputmethod')
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java50
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java24
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java22
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java28
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java20
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java2
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java21
-rw-r--r--tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java20
8 files changed, 186 insertions, 1 deletions
diff --git a/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java b/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java
new file mode 100644
index 000000000..458f22c45
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java
@@ -0,0 +1,50 @@
+/*
+ * 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.event;
+
+import java.util.ArrayList;
+
+/**
+ * Compatibility class that stands in for the combiner chain in LatinIME.
+ *
+ * This is not used by dicttool, it's just needed by the dependency chain.
+ */
+// TODO: there should not be a dependency to this in dicttool, so there
+// should be a sensible way to separate them cleanly.
+public class CombinerChain {
+ private StringBuilder mComposingWord;
+ public CombinerChain(final String initialText, final Combiner... combinerList) {
+ mComposingWord = new StringBuilder(initialText);
+ }
+
+ public void processEvent(final ArrayList<Event> previousEvents, final Event newEvent) {
+ mComposingWord.append(newEvent.getTextToCommit());
+ }
+
+ public CharSequence getComposingWordWithCombiningFeedback() {
+ return mComposingWord;
+ }
+
+ public void reset() {
+ mComposingWord.setLength(0);
+ }
+
+ public static Combiner[] createCombiners(final String spec) {
+ // Dicttool never uses a combiner at all, so we just return a zero-sized array.
+ return new Combiner[0];
+ }
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java
new file mode 100644
index 000000000..1e63bb526
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2013 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.keyboard;
+
+public class Key {
+ public final int getX() { return 0; }
+ public final int getY() { return 0; }
+ public final int getWidth() { return 0; }
+ public final int getHeight() { return 0; }
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java
new file mode 100644
index 000000000..61b209f4d
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2013 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.keyboard;
+
+public class Keyboard {
+ private final Key KEY = new Key();
+ public final Key getKey(final int i) { return KEY; }
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java
new file mode 100644
index 000000000..561b6637c
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2013 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.keyboard;
+
+public class ProximityInfo {
+ public long getNativeProximityInfo() { return 0l; }
+ private static native long setProximityInfoNative(String locale,
+ int displayWidth, int displayHeight, int gridWidth, int gridHeight,
+ int mostCommonKeyWidth, int mostCommonKeyHeight, int[] proximityCharsArray,
+ int keyCount, int[] keyXCoordinates, int[] keyYCoordinates, int[] keyWidths,
+ int[] keyHeights, int[] keyCharCodes, float[] sweetSpotCenterXs,
+ float[] sweetSpotCenterYs, float[] sweetSpotRadii);
+ private static native void releaseProximityInfoNative(long nativeProximityInfo);
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java b/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java
new file mode 100644
index 000000000..e7aa340fb
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2013 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;
+
+public class LatinIME {
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
index c68bdaabf..d6d5e2d61 100644
--- a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
+++ b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
@@ -21,5 +21,5 @@ public final class JniLibName {
// This class is not publicly instantiable.
}
- public static final String JNI_LIB_NAME = "latinime-dicttool-host";
+ public static final String JNI_LIB_NAME = "latinime-aosp-dicttool-host";
}
diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java b/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java
new file mode 100644
index 000000000..6a430d57d
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2013 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 AdditionalFeaturesSettingUtils {
+ public static final int ADDITIONAL_FEATURES_SETTINGS_SIZE = 0;
+}
diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java b/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java
new file mode 100644
index 000000000..f4ca94a81
--- /dev/null
+++ b/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java
@@ -0,0 +1,20 @@
+/*
+ * 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.utils;
+
+public final class LanguageModelParam {
+}