Fix illegal cast in a logging code

This is a follow up CL for I19ad8542659bc092b92ee13eb9,
which introduced a ClassCastException error in the logging code
of MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER handler.

With this CL, the protocol in question looks like:
- what: MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER
- arg1: sequence number to be passed to
    #setUserActionNotificationSequenceNumber(int)
- arg2: not used
- obj:  ClientState

BUG: 16238154
BUG: 7043015
Change-Id: I08d52d4564bae9e042a2eff359e92549a66e837b
This commit is contained in:
Yohei Yukawa
2014-08-31 16:10:05 -07:00
parent b730542b75
commit 080fa34577

View File

@@ -2606,15 +2606,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
return true;
case MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER: {
final int sequenceNumber = msg.arg1;
final IInputMethodClient client = (IInputMethodClient)msg.obj;
final ClientState clientState = (ClientState)msg.obj;
try {
client.setUserActionNotificationSequenceNumber(sequenceNumber);
clientState.client.setUserActionNotificationSequenceNumber(sequenceNumber);
} catch (RemoteException e) {
Slog.w(TAG, "Got RemoteException sending "
+ "setUserActionNotificationSequenceNumber("
+ sequenceNumber + ") notification to pid "
+ ((ClientState)msg.obj).pid + " uid "
+ ((ClientState)msg.obj).uid);
+ clientState.pid + " uid "
+ clientState.uid);
}
return true;
}
@@ -3036,7 +3036,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
if (mCurClient != null && mCurClient.client != null) {
executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIO(
MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER,
mCurUserActionNotificationSequenceNumber, mCurClient.client));
mCurUserActionNotificationSequenceNumber, mCurClient));
}
// Set Subtype here