Merge "Fix session race due to pending user-switch task" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
243ac3d355
@@ -2480,6 +2480,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
void onSessionCreated(IInputMethod method, IInputMethodSession session,
|
||||
InputChannel channel) {
|
||||
synchronized (mMethodMap) {
|
||||
if (mUserSwitchHandlerTask != null) {
|
||||
// We have a pending user-switching task so it's better to just ignore this session.
|
||||
channel.dispose();
|
||||
return;
|
||||
}
|
||||
if (mCurMethod != null && method != null
|
||||
&& mCurMethod.asBinder() == method.asBinder()) {
|
||||
if (mCurClient != null) {
|
||||
|
||||
Reference in New Issue
Block a user