Do nothing if hideSoftInput is called from not focused client.

IMMS#hideSoftInput calls IMMS#setImeWindowVisibilityStatusHiddenLocked
if it is called from not focused client.  However this function changes
IMS visibility state and also changes the back key indicator wrongly.
IMMS should just ignore IMMS#hideSoftInput from not-focused client.

As a preparation to fix b/20764441, this CL partially reverts
Ife3a8733b1a1bf43b195ecf4b8c5082b6538d0a0 but shouldn't have any
user-visible UX regressions.

Bug: 20764441

Change-Id: I60963f1474457ff37cca85e262460dca8105acff
This commit is contained in:
Seigo Nonaka
2015-05-06 10:31:47 -07:00
parent 28a516280a
commit ccee75966a

View File

@@ -2038,11 +2038,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
if (DEBUG) Slog.w(TAG, "Ignoring hideSoftInput of uid "
+ uid + ": " + client);
setImeWindowVisibilityStatusHiddenLocked();
return false;
}
} catch (RemoteException e) {
setImeWindowVisibilityStatusHiddenLocked();
return false;
}
}