From f9a9d50491dc583ea568a4f12e57a2f97b9baacb Mon Sep 17 00:00:00 2001 From: Danesh M Date: Sun, 13 Mar 2016 11:32:47 -0700 Subject: [PATCH] InputMethodManager : Move registration to systemReady Move registration to systemReady() so that CMHardware is in a ready state for us to start interacting with. CYNGNOS-1166 Change-Id: I37177c5e99bbe3850c82c6e1da36e9da80279456 --- .../server/InputMethodManagerService.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java index 92407bd38c7b..a9f6e404e343 100644 --- a/services/core/java/com/android/server/InputMethodManagerService.java +++ b/services/core/java/com/android/server/InputMethodManagerService.java @@ -962,17 +962,6 @@ public String[] getPackages(int userId) { } } - // Must happen before registerContentObserverLocked - mCMHardware = CMHardwareManager.getInstance(mContext); - - synchronized (mMethodMap) { - mSettingsObserver.registerContentObserverLocked(userId); - updateFromSettingsLocked(true); - } - - updateTouchHovering(); - updateTouchSensitivity(); - // IMMS wants to receive Intent.ACTION_LOCALE_CHANGED in order to update the current IME // according to the new system locale. final IntentFilter filter = new IntentFilter(); @@ -1136,6 +1125,16 @@ public void systemRunning(StatusBarManagerService statusBar) { } if (!mSystemReady) { mSystemReady = true; + // Must happen before registerContentObserverLocked + mCMHardware = CMHardwareManager.getInstance(mContext); + + mSettingsObserver.registerContentObserverLocked( + mSettings.getCurrentUserId()); + updateFromSettingsLocked(true); + + updateTouchHovering(); + updateTouchSensitivity(); + mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); mNotificationManager = (NotificationManager)