java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Matrix.getValues(float[])' on a null object reference
at android.view.inputmethod.InputMethodManager$H.handleMessage(InputMethodManager.java:721)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7629)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
此问题由Android 10 r1~r14 系统本身的一个BUG引起,此问题在Android 10 r15被修复
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;
}