Skip to content

Commit 411e95f

Browse files
kufikugelcodex-corp
authored andcommitted
InputWrapper: opt out early if session == null
Change-Id: If111195ba6425ad6b8663601566f9f260738ec77
1 parent 52a3055 commit 411e95f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/java/android/inputmethodservice/IInputMethodWrapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ public void createSession(InputChannel channel, IInputSessionCallback callback)
283283

284284
@Override
285285
public void setSessionEnabled(IInputMethodSession session, boolean enabled) {
286+
if (session == null) {
287+
Log.w(TAG, "Incoming session is null");
288+
return;
289+
}
286290
try {
287291
InputMethodSession ls = ((IInputMethodSessionWrapper)
288292
session).getInternalInputMethodSession();

0 commit comments

Comments
 (0)