Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,7 @@ package android { field public static final int summaryOff = 16843248; // 0x10101f0 field public static final int summaryOn = 16843247; // 0x10101ef field public static final int supportsRtl = 16843688; // 0x10103a8 field public static final int supportsSentenceSpellCheck = 16843698; // 0x10103b2 field public static final int supportsUploading = 16843419; // 0x101029b field public static final int switchMinWidth = 16843632; // 0x1010370 field public static final int switchPadding = 16843633; // 0x1010371 Loading Loading @@ -25280,11 +25281,13 @@ package android.view.textservice { method public android.view.textservice.SpellCheckerInfo getSpellChecker(); method public void getSuggestions(android.view.textservice.TextInfo, int); method public void getSuggestions(android.view.textservice.TextInfo[], int, boolean); method public boolean isSentenceSpellCheckSupported(); method public boolean isSessionDisconnected(); field public static final java.lang.String SERVICE_META_DATA = "android.view.textservice.scs"; } public static abstract interface SpellCheckerSession.SpellCheckerSessionListener { method public abstract void onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[]); method public abstract void onGetSuggestions(android.view.textservice.SuggestionsInfo[]); } core/java/android/view/textservice/SpellCheckerInfo.java +12 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ 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 Loading Loading @@ -97,6 +98,9 @@ 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(); Loading Loading @@ -138,6 +142,7 @@ 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); Loading @@ -152,6 +157,12 @@ public final class SpellCheckerInfo implements Parcelable { return mId; } /** * @hide */ public boolean isSentenceSpellCheckSupported() { return mSupportsSentenceSpellCheck; } /** * Return the component of the service that implements. Loading @@ -177,6 +188,7 @@ 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); Loading core/java/android/view/textservice/SpellCheckerSession.java +5 −5 Original line number Diff line number Diff line Loading @@ -436,15 +436,15 @@ public class SpellCheckerSession { */ public interface SpellCheckerSessionListener { /** * Callback for {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} * Callback for {@link SpellCheckerSession#getSuggestions(TextInfo, int)} * and {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} * @param results an array of {@link SuggestionsInfo}s. * These results are suggestions for {@link TextInfo}s queried by * {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)}. * {@link SpellCheckerSession#getSuggestions(TextInfo, int)} or * {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} */ public void onGetSuggestions(SuggestionsInfo[] results); // TODO: Remove @hide as soon as the sample spell checker client gets fixed. /** * @hide * Callback for {@link SpellCheckerSession#getSentenceSuggestions(TextInfo[], int)} * @param results an array of {@link SentenceSuggestionsInfo}s. * These results are suggestions for {@link TextInfo}s Loading Loading @@ -494,7 +494,7 @@ public class SpellCheckerSession { } /** * @hide * @return true if the spell checker supports sentence level spell checking APIs */ public boolean isSentenceSpellCheckSupported() { return mSubtype.containsExtraValueKey(SUPPORT_SENTENCE_SPELL_CHECK); Loading core/res/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2349,6 +2349,8 @@ <!-- Component name of an activity that allows the user to modify the settings for this service. --> <attr name="settingsActivity"/> <!-- Set true when the spell checker supports sentence level spell checking. --> <attr name="supportsSentenceSpellCheck" format="boolean" /> </declare-styleable> <!-- This is the subtype of the spell checker. Subtype can describe locales (e.g. en_US, fr_FR...) --> Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3578,4 +3578,5 @@ <public type="attr" name="parentActivityName" /> <public type="attr" name="supportsSentenceSpellCheck" /> </resources> Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,7 @@ package android { field public static final int summaryOff = 16843248; // 0x10101f0 field public static final int summaryOn = 16843247; // 0x10101ef field public static final int supportsRtl = 16843688; // 0x10103a8 field public static final int supportsSentenceSpellCheck = 16843698; // 0x10103b2 field public static final int supportsUploading = 16843419; // 0x101029b field public static final int switchMinWidth = 16843632; // 0x1010370 field public static final int switchPadding = 16843633; // 0x1010371 Loading Loading @@ -25280,11 +25281,13 @@ package android.view.textservice { method public android.view.textservice.SpellCheckerInfo getSpellChecker(); method public void getSuggestions(android.view.textservice.TextInfo, int); method public void getSuggestions(android.view.textservice.TextInfo[], int, boolean); method public boolean isSentenceSpellCheckSupported(); method public boolean isSessionDisconnected(); field public static final java.lang.String SERVICE_META_DATA = "android.view.textservice.scs"; } public static abstract interface SpellCheckerSession.SpellCheckerSessionListener { method public abstract void onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[]); method public abstract void onGetSuggestions(android.view.textservice.SuggestionsInfo[]); }
core/java/android/view/textservice/SpellCheckerInfo.java +12 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ 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 Loading Loading @@ -97,6 +98,9 @@ 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(); Loading Loading @@ -138,6 +142,7 @@ 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); Loading @@ -152,6 +157,12 @@ public final class SpellCheckerInfo implements Parcelable { return mId; } /** * @hide */ public boolean isSentenceSpellCheckSupported() { return mSupportsSentenceSpellCheck; } /** * Return the component of the service that implements. Loading @@ -177,6 +188,7 @@ 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); Loading
core/java/android/view/textservice/SpellCheckerSession.java +5 −5 Original line number Diff line number Diff line Loading @@ -436,15 +436,15 @@ public class SpellCheckerSession { */ public interface SpellCheckerSessionListener { /** * Callback for {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} * Callback for {@link SpellCheckerSession#getSuggestions(TextInfo, int)} * and {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} * @param results an array of {@link SuggestionsInfo}s. * These results are suggestions for {@link TextInfo}s queried by * {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)}. * {@link SpellCheckerSession#getSuggestions(TextInfo, int)} or * {@link SpellCheckerSession#getSuggestions(TextInfo[], int, boolean)} */ public void onGetSuggestions(SuggestionsInfo[] results); // TODO: Remove @hide as soon as the sample spell checker client gets fixed. /** * @hide * Callback for {@link SpellCheckerSession#getSentenceSuggestions(TextInfo[], int)} * @param results an array of {@link SentenceSuggestionsInfo}s. * These results are suggestions for {@link TextInfo}s Loading Loading @@ -494,7 +494,7 @@ public class SpellCheckerSession { } /** * @hide * @return true if the spell checker supports sentence level spell checking APIs */ public boolean isSentenceSpellCheckSupported() { return mSubtype.containsExtraValueKey(SUPPORT_SENTENCE_SPELL_CHECK); Loading
core/res/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2349,6 +2349,8 @@ <!-- Component name of an activity that allows the user to modify the settings for this service. --> <attr name="settingsActivity"/> <!-- Set true when the spell checker supports sentence level spell checking. --> <attr name="supportsSentenceSpellCheck" format="boolean" /> </declare-styleable> <!-- This is the subtype of the spell checker. Subtype can describe locales (e.g. en_US, fr_FR...) --> Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3578,4 +3578,5 @@ <public type="attr" name="parentActivityName" /> <public type="attr" name="supportsSentenceSpellCheck" /> </resources>