diff options
Diffstat (limited to 'core/java')
3 files changed, 30 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 15c57e6..be154e6 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3785,6 +3785,13 @@ public final class Settings { "selected_spell_checker_subtype"; /** + * The {@link ComponentName} string whether spell checker is enabled or not. + * + * @hide + */ + public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; + + /** * What happens when the user presses the Power button while in-call * and the screen is on.<br/> * <b>Values:</b><br/> diff --git a/core/java/android/view/textservice/TextServicesManager.java b/core/java/android/view/textservice/TextServicesManager.java index bb13052..5dca348 100644 --- a/core/java/android/view/textservice/TextServicesManager.java +++ b/core/java/android/view/textservice/TextServicesManager.java @@ -170,5 +170,26 @@ public final class TextServicesManager { } } + /** + * @hide + */ + public void setSpellCheckerEnabled(boolean enabled) { + try { + sService.setSpellCheckerEnabled(enabled); + } catch (RemoteException e) { + Log.e(TAG, "Error in setSpellCheckerSubtype:" + e); + } + } + /** + * @hide + */ + public boolean isSpellCheckerEnabled() { + try { + return sService.isSpellCheckerEnabled(); + } catch (RemoteException e) { + Log.e(TAG, "Error in setSpellCheckerSubtype:" + e); + return false; + } + } } diff --git a/core/java/com/android/internal/textservice/ITextServicesManager.aidl b/core/java/com/android/internal/textservice/ITextServicesManager.aidl index cc30c17..b18af02 100644 --- a/core/java/com/android/internal/textservice/ITextServicesManager.aidl +++ b/core/java/com/android/internal/textservice/ITextServicesManager.aidl @@ -37,5 +37,7 @@ interface ITextServicesManager { oneway void finishSpellCheckerService(in ISpellCheckerSessionListener listener); oneway void setCurrentSpellChecker(String locale, String sciId); oneway void setCurrentSpellCheckerSubtype(String locale, int hashCode); + oneway void setSpellCheckerEnabled(boolean enabled); + boolean isSpellCheckerEnabled(); SpellCheckerInfo[] getEnabledSpellCheckers(); } |