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

Commit 651667ce authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed Save logic so it's not triggered when field was not autofilled." into pi-dev

parents 22159e86 a594510b
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -1438,6 +1438,19 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                final AutofillValue filledValue = viewState.getAutofilledValue();

                if (!value.equals(filledValue)) {
                    boolean changed = true;
                    if (filledValue == null) {
                        // Dataset was not autofilled, make sure initial value didn't change.
                        final AutofillValue initialValue = getValueFromContextsLocked(id);
                        if (initialValue != null && initialValue.equals(value)) {
                            if (sDebug) {
                                Slog.d(TAG, "id " + id + " is part of dataset but initial value "
                                        + "didn't change: " + value);
                            }
                            changed = false;
                        }
                    }
                    if (changed) {
                        if (sDebug) {
                            Slog.d(TAG, "found a change on required " + id + ": " + filledValue
                                    + " => " + value);
@@ -1446,6 +1459,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                    }
                }
            }
        }

        final AutofillId[] optionalIds = saveInfo.getOptionalIds();
        if (allRequiredAreNotEmpty) {