summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index d302c2b08217..032af1c5c7b5 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -707,9 +707,10 @@ public final class InputMethodManager {
if (mBindSequence != bindSequence) {
return;
}
- if (matrixValues == null) {
- // That this app is unbound from the parent ActivityView. In this case,
- // calling updateCursorAnchorInfo() isn't safe. Only clear the matrix.
+ if (matrixValues == null || mActivityViewToScreenMatrix == null) {
+ // Either InputBoundResult#mActivityViewToScreenMatrixValues is null
+ // OR this app is unbound from the parent ActivityView. In this case,
+ // calling updateCursorAnchorInfo() isn't safe. Only clear the matrix.
mActivityViewToScreenMatrix = null;
return;
}