From 44b75030931d9c65c9e495a86d11d71da59b4429 Mon Sep 17 00:00:00 2001 From: satok Date: Fri, 14 Oct 2011 14:48:59 +0900 Subject: Add documents for the spell checker framework and the input method subtype Bug: 4973788 Change-Id: I7e650f336ba1bb8949899e8b2355e6d492a2e4b2 --- .../view/textservice/SpellCheckerSession.java | 45 ++++++++++++++++++++++ .../view/textservice/TextServicesManager.java | 25 ++++++++++++ 2 files changed, 70 insertions(+) (limited to 'core/java/android/view/textservice') diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java index b940b80..793f514 100644 --- a/core/java/android/view/textservice/SpellCheckerSession.java +++ b/core/java/android/view/textservice/SpellCheckerSession.java @@ -34,6 +34,51 @@ import java.util.Queue; /** * The SpellCheckerSession interface provides the per client functionality of SpellCheckerService. + * + * + * + *

Applications

+ * + *

In most cases, applications that are using the standard + * {@link android.widget.TextView} or its subclasses will have little they need + * to do to work well with spell checker services. The main things you need to + * be aware of are:

+ * + * + * + *

For the rare people amongst us writing client applications that use the spell checker service + * directly, you will need to use {@link #getSuggestions(TextInfo, int)} or + * {@link #getSuggestions(TextInfo[], int, boolean)} for obtaining results from the spell checker + * service by yourself.

+ * + *

Security

+ * + *

There are a lot of security issues associated with spell checkers, + * since they could monitor all the text being sent to them + * through, for instance, {@link android.widget.TextView}. + * The Android spell checker framework also allows + * arbitrary third party spell checkers, so care must be taken to restrict their + * selection and interactions.

+ * + *

Here are some key points about the security architecture behind the + * spell checker framework:

+ * + * + * */ public class SpellCheckerSession { private static final String TAG = SpellCheckerSession.class.getSimpleName(); diff --git a/core/java/android/view/textservice/TextServicesManager.java b/core/java/android/view/textservice/TextServicesManager.java index b06c112..69f88a5 100644 --- a/core/java/android/view/textservice/TextServicesManager.java +++ b/core/java/android/view/textservice/TextServicesManager.java @@ -35,6 +35,31 @@ import java.util.Locale; * * The user can change the current text services in Settings. And also applications can specify * the target text services. + * + *

Architecture Overview

+ * + *

There are three primary parties involved in the text services + * framework (TSF) architecture:

+ * + * + * + *

Text services sessions

+ * + * */ public final class TextServicesManager { private static final String TAG = TextServicesManager.class.getSimpleName(); -- cgit v1.1