Merge "Fixed Save logic so it's not triggered when field was not autofilled." into pi-dev
am: 651667cea1
Change-Id: Ic451775af3bf26f9f34f5f4e3e09ed88d1d3121f
This commit is contained in:
@@ -1438,11 +1438,25 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
||||
final AutofillValue filledValue = viewState.getAutofilledValue();
|
||||
|
||||
if (!value.equals(filledValue)) {
|
||||
if (sDebug) {
|
||||
Slog.d(TAG, "found a change on required " + id + ": " + filledValue
|
||||
+ " => " + value);
|
||||
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);
|
||||
}
|
||||
atLeastOneChanged = true;
|
||||
}
|
||||
atLeastOneChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user