Skip to content

Commit

Permalink
InputMethodManager : Move registration to systemReady
Browse files Browse the repository at this point in the history
Move registration to systemReady() so that CMHardware
is in a ready state for us to start interacting with.

CYNGNOS-1166

Change-Id: I37177c5e99bbe3850c82c6e1da36e9da80279456
  • Loading branch information
Danesh authored and Gerrit Code Review committed Mar 14, 2016
1 parent cf08385 commit f9a9d50
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f9a9d50

Please sign in to comment.