summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-09-13 00:47:46 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-09-13 00:47:46 +0000
commitc1bf6e66ac9585b4a80b7da84fb1a569d690a7b3 (patch)
treebcd7af14fafc1edb5ea0076b6233f97e2e79296d
parent21b8d375c87e1baf5f2aa753f2c445b49df06163 (diff)
parent8a58b2161fabe50d64522524ad42ab34737fc678 (diff)
Merge "Fix a background NPE in A11yIME" into tm-qpr-dev am: 8a58b2161f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19915824 Change-Id: I9639d79c7a3abdf936bad91dafa68ed48cd585d6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/accessibilityservice/InputMethod.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/accessibilityservice/InputMethod.java b/core/java/android/accessibilityservice/InputMethod.java
index 1585f99759cd..93888ef5ba6f 100644
--- a/core/java/android/accessibilityservice/InputMethod.java
+++ b/core/java/android/accessibilityservice/InputMethod.java
@@ -517,7 +517,8 @@ public class InputMethod {
@Override
public void invalidateInput(EditorInfo editorInfo,
IRemoteAccessibilityInputConnection connection, int sessionId) {
- if (!mStartedInputConnection.isSameConnection(connection)) {
+ if (!mEnabled || mStartedInputConnection == null
+ || !mStartedInputConnection.isSameConnection(connection)) {
// This is not an error, and can be safely ignored.
return;
}