Skip to content

Commit 06a591c

Browse files
author
Dianne Hackborn
committed
Fix last change -- don't call startInputInner() with lock held.
Change-Id: Ie7a145c5a07f08ae8a3f5954a1c389bfbd946b69
1 parent e8e0527 commit 06a591c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

core/java/android/view/inputmethod/InputMethodManager.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public void handleMessage(Message msg) {
336336
}
337337
case MSG_UNBIND: {
338338
final int sequence = msg.arg1;
339+
boolean startInput = false;
339340
synchronized (mH) {
340341
if (mBindSequence == sequence) {
341342
if (false) {
@@ -356,10 +357,13 @@ public void handleMessage(Message msg) {
356357
mServedConnecting = true;
357358
}
358359
if (mActive) {
359-
startInputInner();
360+
startInput = true;
360361
}
361362
}
362363
}
364+
if (startInput) {
365+
startInputInner();
366+
}
363367
return;
364368
}
365369
case MSG_SET_ACTIVE: {
@@ -1209,12 +1213,13 @@ public void onWindowFocus(View rootView, View focusedView, int softInputMode,
12091213
mService.windowGainedFocus(mClient, rootView.getWindowToken(),
12101214
focusedView != null, isTextEditor, softInputMode, first,
12111215
windowFlags);
1212-
if (startInput) {
1213-
startInputInner();
1214-
}
12151216
} catch (RemoteException e) {
12161217
}
12171218
}
1219+
1220+
if (startInput) {
1221+
startInputInner();
1222+
}
12181223
}
12191224

12201225
/** @hide */

0 commit comments

Comments
 (0)