Merge "Skip updateCursorAnchorInfo when matrix is null" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-09-04 01:01:31 +00:00
committed by Android (Google) Code Review

View File

@@ -707,8 +707,9 @@ public final class InputMethodManager {
if (mBindSequence != bindSequence) { if (mBindSequence != bindSequence) {
return; return;
} }
if (matrixValues == null) { if (matrixValues == null || mActivityViewToScreenMatrix == null) {
// That this app is unbound from the parent ActivityView. In this case, // 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. // calling updateCursorAnchorInfo() isn't safe. Only clear the matrix.
mActivityViewToScreenMatrix = null; mActivityViewToScreenMatrix = null;
return; return;