Merge "DO NOT MERGE: Freeup lock when IME is set inactive and unbound" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-11-26 19:42:45 +00:00
committed by Android (Google) Code Review

View File

@@ -655,6 +655,7 @@ public final class InputMethodManager {
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
}
// Check focus again in case that "onWindowFocus" is called before // Check focus again in case that "onWindowFocus" is called before
// handling this message. // handling this message.
if (mServedView != null && canStartInput(mServedView)) { if (mServedView != null && canStartInput(mServedView)) {
@@ -664,7 +665,6 @@ public final class InputMethodManager {
startInputInner(reason, null, 0, 0, 0); startInputInner(reason, null, 0, 0, 0);
} }
} }
}
return; return;
} }
case MSG_SEND_INPUT_EVENT: { case MSG_SEND_INPUT_EVENT: {
@@ -1225,6 +1225,10 @@ public final class InputMethodManager {
*/ */
void clearBindingLocked() { void clearBindingLocked() {
if (DEBUG) Log.v(TAG, "Clearing binding!"); if (DEBUG) Log.v(TAG, "Clearing binding!");
if (mWindowFocusGainFuture != null) {
mWindowFocusGainFuture.cancel(false /* mayInterruptIfRunning */);
mWindowFocusGainFuture = null;
}
clearConnectionLocked(); clearConnectionLocked();
setInputChannelLocked(null); setInputChannelLocked(null);
mBindSequence = -1; mBindSequence = -1;