Use SystemService lifecycle API in input method service

Change-Id: Ic17667df60b30e5355b61a3601ad27a000cab3a3
This commit is contained in:
Fyodor Kupolov
2016-01-21 12:02:58 -08:00
parent bcd2b7179a
commit 1e33dc8fdf
2 changed files with 26 additions and 16 deletions

View File

@@ -570,7 +570,6 @@ public final class SystemServer {
StatusBarManagerService statusBar = null;
INotificationManager notification = null;
InputMethodManagerService imm = null;
WallpaperManagerService wallpaper = null;
LocationManagerService location = null;
CountryDetectorService countryDetector = null;
@@ -581,14 +580,7 @@ public final class SystemServer {
// Bring up services needed for UI.
if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
traceBeginAndSlog("StartInputMethodManagerService");
try {
imm = new InputMethodManagerService(context);
ServiceManager.addService(Context.INPUT_METHOD_SERVICE, imm);
} catch (Throwable e) {
reportWtf("starting Input Manager Service", e);
}
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);
traceBeginAndSlog("StartAccessibilityManagerService");
try {
@@ -1167,7 +1159,6 @@ public final class SystemServer {
final ConnectivityService connectivityF = connectivity;
final NetworkScoreService networkScoreF = networkScore;
final WallpaperManagerService wallpaperF = wallpaper;
final InputMethodManagerService immF = imm;
final LocationManagerService locationF = location;
final CountryDetectorService countryDetectorF = countryDetector;
final NetworkTimeUpdateService networkTimeUpdaterF = networkTimeUpdater;
@@ -1263,11 +1254,6 @@ public final class SystemServer {
} catch (Throwable e) {
reportWtf("Notifying WallpaperService running", e);
}
try {
if (immF != null) immF.systemRunning(statusBarF);
} catch (Throwable e) {
reportWtf("Notifying InputMethodService running", e);
}
try {
if (locationF != null) locationF.systemRunning();
} catch (Throwable e) {