merge from open-source master

Change-Id: I6a8109d11dabc579501c598ab2927cf802797130
This commit is contained in:
The Android Open Source Project
2010-03-29 10:57:04 -07:00
4 changed files with 62 additions and 21 deletions

View File

@ -889,13 +889,27 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
MSG_UNBIND_METHOD, mCurSeq, mCurClient.client));
}
}
private void finishSession(SessionState sessionState) {
if (sessionState != null && sessionState.session != null) {
try {
sessionState.session.finishSession();
} catch (RemoteException e) {
Log.w(TAG, "Session failed to close due to remote exception", e);
}
}
}
void clearCurMethodLocked() {
if (mCurMethod != null) {
for (ClientState cs : mClients.values()) {
cs.sessionRequested = false;
finishSession(cs.curSession);
cs.curSession = null;
}
finishSession(mEnabledSession);
mEnabledSession = null;
mCurMethod = null;
}
mStatusBar.setIconVisibility(mInputMethodIcon, false);