Skip to content

Commit a5142a8

Browse files
Jean ChalardAndroid (Google) Code Review
authored andcommitted
Merge "Fix a warning from the binder, step 3."
2 parents a80838d + e0d32a6 commit a5142a8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

services/java/com/android/server/InputMethodManagerService.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,13 @@ public void onSomePackagesChanged() {
493493
}
494494
}
495495

496-
class MethodCallback extends IInputMethodCallback.Stub {
497-
final IInputMethod mMethod;
496+
private static class MethodCallback extends IInputMethodCallback.Stub {
497+
private final IInputMethod mMethod;
498+
private final InputMethodManagerService mParentIMMS;
498499

499-
MethodCallback(IInputMethod method) {
500+
MethodCallback(final IInputMethod method, final InputMethodManagerService imms) {
500501
mMethod = method;
502+
mParentIMMS = imms;
501503
}
502504

503505
@Override
@@ -506,7 +508,7 @@ public void finishedEvent(int seq, boolean handled) throws RemoteException {
506508

507509
@Override
508510
public void sessionCreated(IInputMethodSession session) throws RemoteException {
509-
onSessionCreated(mMethod, session);
511+
mParentIMMS.onSessionCreated(mMethod, session);
510512
}
511513
}
512514

@@ -837,7 +839,7 @@ InputBindResult startInputLocked(IInputMethodClient client,
837839
if (DEBUG) Slog.v(TAG, "Creating new session for client " + cs);
838840
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
839841
MSG_CREATE_SESSION, mCurMethod,
840-
new MethodCallback(mCurMethod)));
842+
new MethodCallback(mCurMethod, this)));
841843
}
842844
// Return to client, and we will get back with it when
843845
// we have had a session made for it.
@@ -943,7 +945,7 @@ public void onServiceConnected(ComponentName name, IBinder service) {
943945
+ mCurClient);
944946
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
945947
MSG_CREATE_SESSION, mCurMethod,
946-
new MethodCallback(mCurMethod)));
948+
new MethodCallback(mCurMethod, this)));
947949
}
948950
}
949951
}

0 commit comments

Comments
 (0)