Clear IMMS#mCurClient when it is dead.
Suppose the following case:
1. Launch an activity.
2. Focus in an EditText on the activity. IME is shown up.
3. Kill the activity process in a not graceful way, e.g.,
'adb shell kill'
After step 3, IMMS#removeClient(client) is immediately called back from
com.android.server.wm.Session, which is good, but we forgot to clear
IMMS#mCurClient to null.
Basically not clearing IMMS#mCurClient there is not so critical, because
1) we already have bunch of RemoteException check for the case where
IPC target is already dead, and in theory we cannot avoid this kind of
runtime error anyway, and 2) in most of cases new input method client
gains focus.
That said, in conjunction with other focus-related issues such
as bug #
25373872, not cleaning that can result in the following error
message in 'input_method:' section of bugreport, which might be a bit
confusing.
Input method client dead: android.os.DeadObjectException
The primary goal of this CL is to make bugreport less confusing. Any
user/developer-visible changes beyond that is unintentional.
Bug:
25373872
Change-Id: Iee001ad9cce0c8c6324e3c0984be1e6f0e641d05