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

Commit aa9a96a5 authored by Adam He's avatar Adam He
Browse files

Sanitization before BatchUpdates and Transformations

Test: atest android.autofillservice.cts.CustomDescriptionTest#testSanitizationBeforeBatchUpdates android.autofillservice.cts.CustomDescriptionTest#testSanitizationBeforeTransformations
Test: atest CtsAutoFillServiceTestCases
Bug: 112439028
Change-Id: I9192f3b869d0f40d6a3a1f8cafe10d2aaa35a79c
parent 390c1409
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -400,7 +400,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
    @Nullable
    private AutofillValue findValueLocked(@NonNull AutofillId autofillId) {
        final AutofillValue value = findValueFromThisSessionOnlyLocked(autofillId);
        if (value != null) return value;
        if (value != null) {
            return getSanitizedValue(createSanitizers(getSaveInfoLocked()), autofillId, value);
        }

        // TODO(b/113281366): rather than explicitly look for previous session, it might be better
        // to merge the sessions when created (see note on mergePreviousSessionLocked())
@@ -415,7 +417,8 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                final AutofillValue previousValue = previousSession
                        .findValueFromThisSessionOnlyLocked(autofillId);
                if (previousValue != null) {
                    return previousValue;
                    return getSanitizedValue(createSanitizers(previousSession.getSaveInfoLocked()),
                            autofillId, previousValue);
                }
            }
        }