Disentangle input manager service startup.
We will be adding additional callbacks for other components.
This change makes it clearer how the input manager is started
and where the callbacks are initialized.
Bug: 6548391
Change-Id: I4b2a61482126a12b7cf11fafe513f846c76c11e5
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 2792704..155ad55 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -300,16 +300,22 @@
Watchdog.getInstance().init(context, battery, power, alarm,
ActivityManagerService.self());
+ Slog.i(TAG, "Input Manager");
+ inputManager = new InputManagerService(context, wmHandler);
+
Slog.i(TAG, "Window Manager");
- wm = WindowManagerService.main(context, power, display,
+ wm = WindowManagerService.main(context, power, display, inputManager,
uiHandler, wmHandler,
factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL,
!firstBoot, onlyCore);
ServiceManager.addService(Context.WINDOW_SERVICE, wm);
- inputManager = wm.getInputManagerService();
ServiceManager.addService(Context.INPUT_SERVICE, inputManager);
ActivityManagerService.self().setWindowManager(wm);
+
+ inputManager.setWindowManagerCallbacks(wm.getInputMonitor());
+ inputManager.start();
+
display.setWindowManager(wm);
display.setInputManager(inputManager);