Loading core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -51759,6 +51759,10 @@ package android.view.textservice { } public final class TextServicesManager { method @Nullable public android.view.textservice.SpellCheckerInfo getCurrentSpellChecker(); method @Nullable public android.view.textservice.SpellCheckerSubtype getCurrentSpellCheckerSubtype(boolean); method @Nullable public java.util.List<android.view.textservice.SpellCheckerInfo> getEnabledSpellCheckersList(); method public boolean isSpellCheckerEnabled(); method public android.view.textservice.SpellCheckerSession newSpellCheckerSession(android.os.Bundle, java.util.Locale, android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener, boolean); } core/api/test-current.txt +0 −4 Original line number Diff line number Diff line Loading @@ -2396,10 +2396,6 @@ package android.view.textservice { field public static final int SUBTYPE_ID_NONE = 0; // 0x0 } public final class TextServicesManager { method public boolean isSpellCheckerEnabled(); } } package android.widget { Loading core/java/android/view/textservice/TextServicesManager.java +27 −8 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ package android.view.textservice; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemService; import android.annotation.TestApi; import android.annotation.UserIdInt; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading @@ -34,6 +34,8 @@ import android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener; import com.android.internal.textservice.ISpellCheckerSessionListener; import com.android.internal.textservice.ITextServicesManager; import java.util.Arrays; import java.util.List; import java.util.Locale; /** Loading Loading @@ -232,9 +234,22 @@ public final class TextServicesManager { } /** * @hide * Retrieve the list of currently enabled spell checkers, or null if there is none. * * @return The list of currently enabled spell checkers. */ @UnsupportedAppUsage @Nullable public List<SpellCheckerInfo> getEnabledSpellCheckersList() { final SpellCheckerInfo[] enabledSpellCheckers = getEnabledSpellCheckers(); return enabledSpellCheckers != null ? Arrays.asList(enabledSpellCheckers) : null; } /** * Retrieve the currently active spell checker, or null if there is none. * * @return The current active spell checker info. */ @Nullable public SpellCheckerInfo getCurrentSpellChecker() { try { // Passing null as a locale for ICS Loading @@ -245,9 +260,13 @@ public final class TextServicesManager { } /** * @hide * Retrieve the selected subtype of the selected spell checker, or null if there is none. * * @param allowImplicitlySelectedSubtype {@code true} to return the default language matching * system locale if there's no subtype selected explicitly, otherwise, returns null. * @return The meta information of the selected subtype of the selected spell checker. */ @UnsupportedAppUsage @Nullable public SpellCheckerSubtype getCurrentSpellCheckerSubtype( boolean allowImplicitlySelectedSubtype) { try { Loading @@ -258,10 +277,10 @@ public final class TextServicesManager { } /** * @hide * Return whether the spell checker is enabled or not. * * @return {@code true} if spell checker is enabled, {@code false} otherwise. */ @UnsupportedAppUsage @TestApi public boolean isSpellCheckerEnabled() { try { return mService.isSpellCheckerEnabled(mUserId); Loading Loading
core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -51759,6 +51759,10 @@ package android.view.textservice { } public final class TextServicesManager { method @Nullable public android.view.textservice.SpellCheckerInfo getCurrentSpellChecker(); method @Nullable public android.view.textservice.SpellCheckerSubtype getCurrentSpellCheckerSubtype(boolean); method @Nullable public java.util.List<android.view.textservice.SpellCheckerInfo> getEnabledSpellCheckersList(); method public boolean isSpellCheckerEnabled(); method public android.view.textservice.SpellCheckerSession newSpellCheckerSession(android.os.Bundle, java.util.Locale, android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener, boolean); }
core/api/test-current.txt +0 −4 Original line number Diff line number Diff line Loading @@ -2396,10 +2396,6 @@ package android.view.textservice { field public static final int SUBTYPE_ID_NONE = 0; // 0x0 } public final class TextServicesManager { method public boolean isSpellCheckerEnabled(); } } package android.widget { Loading
core/java/android/view/textservice/TextServicesManager.java +27 −8 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ package android.view.textservice; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemService; import android.annotation.TestApi; import android.annotation.UserIdInt; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading @@ -34,6 +34,8 @@ import android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener; import com.android.internal.textservice.ISpellCheckerSessionListener; import com.android.internal.textservice.ITextServicesManager; import java.util.Arrays; import java.util.List; import java.util.Locale; /** Loading Loading @@ -232,9 +234,22 @@ public final class TextServicesManager { } /** * @hide * Retrieve the list of currently enabled spell checkers, or null if there is none. * * @return The list of currently enabled spell checkers. */ @UnsupportedAppUsage @Nullable public List<SpellCheckerInfo> getEnabledSpellCheckersList() { final SpellCheckerInfo[] enabledSpellCheckers = getEnabledSpellCheckers(); return enabledSpellCheckers != null ? Arrays.asList(enabledSpellCheckers) : null; } /** * Retrieve the currently active spell checker, or null if there is none. * * @return The current active spell checker info. */ @Nullable public SpellCheckerInfo getCurrentSpellChecker() { try { // Passing null as a locale for ICS Loading @@ -245,9 +260,13 @@ public final class TextServicesManager { } /** * @hide * Retrieve the selected subtype of the selected spell checker, or null if there is none. * * @param allowImplicitlySelectedSubtype {@code true} to return the default language matching * system locale if there's no subtype selected explicitly, otherwise, returns null. * @return The meta information of the selected subtype of the selected spell checker. */ @UnsupportedAppUsage @Nullable public SpellCheckerSubtype getCurrentSpellCheckerSubtype( boolean allowImplicitlySelectedSubtype) { try { Loading @@ -258,10 +277,10 @@ public final class TextServicesManager { } /** * @hide * Return whether the spell checker is enabled or not. * * @return {@code true} if spell checker is enabled, {@code false} otherwise. */ @UnsupportedAppUsage @TestApi public boolean isSpellCheckerEnabled() { try { return mService.isSpellCheckerEnabled(mUserId); Loading