Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3a39b3a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Change clearEvents() to clear existing events rather than setting...

Merge "Change clearEvents() to clear existing events rather than setting mEvents to null to remove possible NPE." into sc-dev am: ed17f3e2 am: 35c3184b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14332748

Change-Id: I55ce1249836192d83274f9089d8fe5a864b04932
parents bdb7d803 35c3184b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -583,9 +583,9 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
        // NOTE: we must save a reference to the current mEvents and then set it to to null,
        // otherwise clearing it would clear it in the receiving side if the service is also local.
        final List<ContentCaptureEvent> events = mEvents == null
                ? Collections.emptyList()
                : mEvents;
        mEvents = null;
                ? Collections.EMPTY_LIST
                : new ArrayList<>(mEvents);
        mEvents.clear();
        mLastComposingSpan.clear();
        return new ParceledListSlice<>(events);
    }