Remove the dependency on IInputMethodClient from IME focus check

This is a preparation to remove the dependency on IInputMethodClient
from WindowManagerService.

What inputMethodClientHasFocus(IInputMethodClient) is currently doing
is basically equivalent to comparing PID (and UID), because
InputMethodManager is a per-process instance and comparing two
IInputMethodClient Binder proxies is no more or less than comparing
PID (and UID pair).  We can just change its method signature to
achieve the same behavior by taking a PID/UID pair instead of taking
IInputMethodClient.

Note that we can later add display ID to this method to support
multi-display scenario.

This CL also renames inputMethodClientHasFocus() to
isInputMethodClientFocus() for better consistency with other methods.

There should be no observable behavior difference in this CL anyway.

Bug: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I444077b1e4af4033f67ab72c181fac85b601e08a
5 files changed