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,
|
void onSessionCreated(IInputMethod method, IInputMethodSession session,
|
||||||
InputChannel channel) {
|
InputChannel channel) {
|
||||||
synchronized (mMethodMap) {
|
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
|
if (mCurMethod != null && method != null
|
||||||
&& mCurMethod.asBinder() == method.asBinder()) {
|
&& mCurMethod.asBinder() == method.asBinder()) {
|
||||||
if (mCurClient != null) {
|
if (mCurClient != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user