Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 080fa345 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

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
parent b730542b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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