Create TextServiceManager and SpellCheckerService

Bug: 4176026

This CL inherits https://android-git.corp.google.com/g/112600

Spec of TextServiceManager
- Chooses the most applicable TextService(e.g. SpellCheckerService, WordBreakIteratorService..)
    for each locale

Spec of SpellCheckerService
- Returns whether the given string is a correct word or not
- Returns Suggestions for the given string

Change-Id: Iaa425c7915fe70767ad0b17bf6c6fbcd2a1200b2
This commit is contained in:
satok
2011-06-22 16:38:13 +09:00
parent b4cd566767
commit 988323c57b
23 changed files with 1604 additions and 3 deletions

View File

@ -230,6 +230,7 @@ class ServerThread extends Thread {
WallpaperManagerService wallpaper = null;
LocationManagerService location = null;
CountryDetectorService countryDetector = null;
TextServicesManagerService tsms = null;
if (factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL) {
try {
@ -272,6 +273,14 @@ class ServerThread extends Thread {
Slog.e(TAG, "Failure starting NetworkManagement Service", e);
}
try {
Slog.i(TAG, "Text Service Manager Service");
tsms = new TextServicesManagerService(context);
ServiceManager.addService(Context.TEXT_SERVICES_MANAGER_SERVICE, tsms);
} catch (Throwable e) {
Slog.e(TAG, "Failure starting Text Service Manager Service", e);
}
try {
Slog.i(TAG, "NetworkStats Service");
networkStats = new NetworkStatsService(context, networkManagement, alarm);
@ -538,6 +547,7 @@ class ServerThread extends Thread {
final LocationManagerService locationF = location;
final CountryDetectorService countryDetectorF = countryDetector;
final NetworkTimeUpdateService networkTimeUpdaterF = networkTimeUpdater;
final TextServicesManagerService textServiceManagerServiceF = tsms;
// We now tell the activity manager it is okay to run third party
// code. It will call back into us once it has gotten to the state
@ -571,6 +581,7 @@ class ServerThread extends Thread {
if (countryDetectorF != null) countryDetectorF.systemReady();
if (throttleF != null) throttleF.systemReady();
if (networkTimeUpdaterF != null) networkTimeUpdaterF.systemReady();
if (textServiceManagerServiceF != null) textServiceManagerServiceF.systemReady();
}
});