summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/autofill/java/com/android/server/autofill/Session.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 755fc54fb6d6..7f5761516302 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -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;
}
}
}