commit | 3d570a490ddff4c2ee872364a9f3e9791e2a39c1 | [log] [tgz] |
---|---|---|
author | Felipe Leme <felipeal@google.com> | Mon Jan 28 13:04:34 2019 -0800 |
committer | Felipe Leme <felipeal@google.com> | Mon Jan 28 13:04:35 2019 -0800 |
tree | 63f7d575ab0acc5407899d4be66d4c25d4c8cdeb | |
parent | d6a69968b3f773a9719e7255452f9e7c11c5c9c5 [diff] [blame] |
Fixed NPE on MainContentCaptureSession.handleFlushIfNeeded Test: atest CtsContentCaptureServiceTestCases Bug: 122959591 Change-Id: Ia3b842326b5eee839693ffc71cbc3d464aabccc7
diff --git a/core/java/android/view/contentcapture/MainContentCaptureSession.java b/core/java/android/view/contentcapture/MainContentCaptureSession.java index 9e99c88..a2ffa2f 100644 --- a/core/java/android/view/contentcapture/MainContentCaptureSession.java +++ b/core/java/android/view/contentcapture/MainContentCaptureSession.java
@@ -402,7 +402,7 @@ } private void handleFlushIfNeeded(@FlushReason int reason) { - if (mEvents.isEmpty()) { + if (mEvents == null || mEvents.isEmpty()) { if (VERBOSE) Log.v(TAG, "Nothing to flush"); return; }