summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Snoeberger <snoeberger@google.com> 2019-10-23 12:55:15 -0400
committer Robert Snoeberger <snoeberger@google.com> 2019-10-23 13:06:27 -0400
commit3acedf287edaf61e94066a9498071e2bcefb92c7 (patch)
treed8c9c9d0a0ce9c9ad94e433005e86d52dea6de9f
parentb77d972ac250f898baf40edeae767bb4e28cd4c2 (diff)
Guard against null when wrapping input connection.
Fixes: 143215978 Test: Not seeing crashes when running memory microbenchmark in ag/9592498. Change-Id: I14d1e75b372b51d5df0693c513fefade3ebdb71b
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index 7b4a7d20293c..502a9bd34b12 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -679,8 +679,8 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
}
};
- InputConnection ic = InputConnectionCompat.createWrapper(
- inputConnection, outAttrs, callback);
+ InputConnection ic = inputConnection == null ? null :
+ InputConnectionCompat.createWrapper(inputConnection, outAttrs, callback);
Context userContext = null;
try {