Skip to content

Commit

Permalink
Merge pull request #263 from AlexVincent525/fix-crash-when-prompt-cal…
Browse files Browse the repository at this point in the history
…led-on-android-q

Fix crash when `prompt` was called on Android Q.
  • Loading branch information
pichillilorenzo authored May 9, 2020
2 parents 0f358f0 + bf322c8 commit 13b9d80
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static android.content.Context.INPUT_METHOD_SERVICE;

import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
Expand Down Expand Up @@ -190,7 +191,11 @@ public void run() {
// onCreateInputConnection() on targetView on the same thread as
// targetView.getHandler(). It will also call subsequent InputConnection methods on this
// thread. This is the IME thread in cases where targetView is our proxyAdapterView.
imm.isActive(containerView);

// TODO (ALexVincent525): Currently only prompt has been tested, still needs more test cases.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
imm.isActive(containerView);
}
}
});
}
Expand Down

0 comments on commit 13b9d80

Please sign in to comment.