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

Commit 996e03e5 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fix NPE on logContextCommitted()

Test: atest CtsAutoFillServiceTestCases:FillEventHistoryTest

Bug: 68045531

Change-Id: Ieaf9f615ed3a203939713e48db808ff0d00ed059
parent 33203ffd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -683,14 +683,14 @@ final class AutofillManagerServiceImpl {
            @Nullable ArrayList<String> changedDatasetIds,
            @Nullable ArrayList<AutofillId> manuallyFilledFieldIds,
            @Nullable ArrayList<ArrayList<String>> manuallyFilledDatasetIds,
            @NonNull ArrayList<AutofillId> detectedFieldIdsList,
            @NonNull ArrayList<Match> detectedMatchesList) {
            @Nullable ArrayList<AutofillId> detectedFieldIdsList,
            @Nullable ArrayList<Match> detectedMatchesList) {

        synchronized (mLock) {
            if (isValidEventLocked("logDatasetNotSelected()", sessionId)) {
                AutofillId[] detectedFieldsIds = null;
                Match[] detectedMatches = null;
                if (!detectedFieldIdsList.isEmpty()) {
                if (detectedFieldIdsList != null) {
                    detectedFieldsIds = new AutofillId[detectedFieldIdsList.size()];
                    detectedFieldIdsList.toArray(detectedFieldsIds);
                    detectedMatches = new Match[detectedMatchesList.size()];