aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-07-25 10:35:51 +0900
committersatok <satok@google.com>2011-07-25 11:05:24 +0900
commit022c1cc20379767966f4915e2dea65fc0b67c0d8 (patch)
tree91bb8ecd5188a8a8729c452077c346fc1589c539 /java/src
parentf3e76883612173f94a8f50b415b8ec89c79766ba (diff)
downloadlatinime-022c1cc20379767966f4915e2dea65fc0b67c0d8.tar.gz
latinime-022c1cc20379767966f4915e2dea65fc0b67c0d8.tar.xz
latinime-022c1cc20379767966f4915e2dea65fc0b67c0d8.zip
[step3] Add spell checker service.
Change-Id: Ib13b3a524e0f0b90de40a3e255040b3158d49258
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
new file mode 100644
index 000000000..156510b40
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 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.spellcheck;
+
+import android.service.textservice.SpellCheckerService;
+import android.view.textservice.SuggestionsInfo;
+import android.view.textservice.TextInfo;
+
+/**
+ * Service for spell checking, using LatinIME's dictionaries and mechanisms.
+ */
+public class AndroidSpellCheckerService extends SpellCheckerService {
+ @Override
+ public SuggestionsInfo getSuggestions(TextInfo textInfo, int suggestionsLimit,
+ String locale) {
+ // TODO: implement this
+ String[] candidates = new String[] {"candidate1", "candidate2", "candidate3"};
+ return new SuggestionsInfo(0, candidates);
+ }
+}