diff options
author | satok <satok@google.com> | 2012-04-11 20:40:07 +0900 |
---|---|---|
committer | satok <satok@google.com> | 2012-04-16 20:02:37 +0900 |
commit | c7ee1b9369ffd7c21a70738056a82dc4238e7fc1 (patch) | |
tree | bbbe595aff7a03e45d51815b10b9740d78a73942 /core/java/android/view/textservice | |
parent | 52c5acacd477cf77a6513ac870251de6bde93a43 (diff) | |
download | frameworks_base-c7ee1b9369ffd7c21a70738056a82dc4238e7fc1.zip frameworks_base-c7ee1b9369ffd7c21a70738056a82dc4238e7fc1.tar.gz frameworks_base-c7ee1b9369ffd7c21a70738056a82dc4238e7fc1.tar.bz2 |
Get rid of "isSentenceLevelSpellCheckSupported"
Bug: 6320351
Change-Id: I0e931b7248f8c65268b60af599c07432d58d2f1f
Diffstat (limited to 'core/java/android/view/textservice')
-rw-r--r-- | core/java/android/view/textservice/SpellCheckerInfo.java | 13 | ||||
-rw-r--r-- | core/java/android/view/textservice/SpellCheckerSession.java | 16 |
2 files changed, 5 insertions, 24 deletions
diff --git a/core/java/android/view/textservice/SpellCheckerInfo.java b/core/java/android/view/textservice/SpellCheckerInfo.java index d05c1af..2167862 100644 --- a/core/java/android/view/textservice/SpellCheckerInfo.java +++ b/core/java/android/view/textservice/SpellCheckerInfo.java @@ -45,7 +45,6 @@ public final class SpellCheckerInfo implements Parcelable { private final ResolveInfo mService; private final String mId; private final int mLabel; - private final boolean mSupportsSentenceSpellCheck; /** * The spell checker setting activity's name, used by the system settings to @@ -98,9 +97,6 @@ public final class SpellCheckerInfo implements Parcelable { label = sa.getResourceId(com.android.internal.R.styleable.SpellChecker_label, 0); settingsActivityComponent = sa.getString( com.android.internal.R.styleable.SpellChecker_settingsActivity); - mSupportsSentenceSpellCheck = sa.getBoolean( - com.android.internal.R.styleable.SpellChecker_supportsSentenceSpellCheck, - false); sa.recycle(); final int depth = parser.getDepth(); @@ -142,7 +138,6 @@ public final class SpellCheckerInfo implements Parcelable { */ public SpellCheckerInfo(Parcel source) { mLabel = source.readInt(); - mSupportsSentenceSpellCheck = source.readInt() != 0; mId = source.readString(); mSettingsActivityName = source.readString(); mService = ResolveInfo.CREATOR.createFromParcel(source); @@ -158,13 +153,6 @@ public final class SpellCheckerInfo implements Parcelable { } /** - * @hide - */ - public boolean isSentenceSpellCheckSupported() { - return mSupportsSentenceSpellCheck; - } - - /** * Return the component of the service that implements. */ public ComponentName getComponent() { @@ -188,7 +176,6 @@ public final class SpellCheckerInfo implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(mLabel); - dest.writeInt(mSupportsSentenceSpellCheck ? 1 : 0); dest.writeString(mId); dest.writeString(mSettingsActivityName); mService.writeToParcel(dest, flags); diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java index 9dc05e4..628da3c 100644 --- a/core/java/android/view/textservice/SpellCheckerSession.java +++ b/core/java/android/view/textservice/SpellCheckerSession.java @@ -91,8 +91,6 @@ public class SpellCheckerSession { * This meta-data must reference an XML resource. **/ public static final String SERVICE_META_DATA = "android.view.textservice.scs"; - private static final String SUPPORT_SENTENCE_SPELL_CHECK = "SupportSentenceSpellCheck"; - private static final int MSG_ON_GET_SUGGESTION_MULTIPLE = 1; private static final int MSG_ON_GET_SUGGESTION_MULTIPLE_FOR_SENTENCE = 2; @@ -191,7 +189,9 @@ public class SpellCheckerSession { * Get candidate strings for a substring of the specified text. * @param textInfo text metadata for a spell checker * @param suggestionsLimit the maximum number of suggestions that will be returned + * @deprecated use {@link SpellCheckerSession#getSentenceSuggestions(TextInfo[], int)} instead */ + @Deprecated public void getSuggestions(TextInfo textInfo, int suggestionsLimit) { getSuggestions(new TextInfo[] {textInfo}, suggestionsLimit, false); } @@ -201,13 +201,14 @@ public class SpellCheckerSession { * @param textInfos an array of text metadata for a spell checker * @param suggestionsLimit the maximum number of suggestions that will be returned * @param sequentialWords true if textInfos can be treated as sequential words. + * @deprecated use {@link SpellCheckerSession#getSentenceSuggestions(TextInfo[], int)} instead */ + @Deprecated public void getSuggestions( TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords) { if (DBG) { Log.w(TAG, "getSuggestions from " + mSpellCheckerInfo.getId()); } - // TODO: Handle multiple words suggestions by using WordBreakIterator mSpellCheckerSessionListenerImpl.getSuggestionsMultiple( textInfos, suggestionsLimit, sequentialWords); } @@ -281,7 +282,7 @@ public class SpellCheckerSession { break; case TASK_GET_SUGGESTIONS_MULTIPLE_FOR_SENTENCE: if (DBG) { - Log.w(TAG, "Get suggestions from the spell checker."); + Log.w(TAG, "Get sentence suggestions from the spell checker."); } try { session.onGetSentenceSuggestionsMultiple( @@ -492,11 +493,4 @@ public class SpellCheckerSession { public ISpellCheckerSessionListener getSpellCheckerSessionListener() { return mSpellCheckerSessionListenerImpl; } - - /** - * @return true if the spell checker supports sentence level spell checking APIs - */ - public boolean isSentenceSpellCheckSupported() { - return mSubtype.containsExtraValueKey(SUPPORT_SENTENCE_SPELL_CHECK); - } } |