android.service.textservice.SpellCheckerService Java Examples
The following examples show how to use
android.service.textservice.SpellCheckerService.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TextServicesManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Nullable private SpellCheckerBindGroup startSpellCheckerServiceInnerLocked(SpellCheckerInfo info, TextServicesData tsd) { if (DBG) { Slog.w(TAG, "Start spell checker session inner locked."); } final String sciId = info.getId(); final InternalServiceConnection connection = new InternalServiceConnection(sciId, tsd.mSpellCheckerBindGroups); final Intent serviceIntent = new Intent(SpellCheckerService.SERVICE_INTERFACE); serviceIntent.setComponent(info.getComponent()); if (DBG) { Slog.w(TAG, "bind service: " + info.getId()); } if (!bindCurrentSpellCheckerService(serviceIntent, connection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT_BACKGROUND, tsd.mUserId)) { Slog.e(TAG, "Failed to get a spell checker service."); return null; } final SpellCheckerBindGroup group = new SpellCheckerBindGroup(connection); tsd.mSpellCheckerBindGroups.put(sciId, group); return group; }