aboutsummaryrefslogtreecommitdiff
path: root/input/autofill
diff options
context:
space:
mode:
authorDouglas Sigelbaum <sigelbaum@google.com>2017-05-25 20:50:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-05-25 20:50:50 +0000
commit4e6e5cbe46390d048c8cd4355bb680cb0b26ec63 (patch)
tree601678dc6014d6b110ca2842078a6fa58ea04d1e /input/autofill
parentfcf34d86a8df8c432b600800544cf81ea35e7b6b (diff)
parentf1d09a98b1a90438b42db5e5014734345803dcd3 (diff)
downloadandroid-4e6e5cbe46390d048c8cd4355bb680cb0b26ec63.tar.gz
Merge "Fixed NPE in autofill sample service." into oc-dev
Diffstat (limited to 'input/autofill')
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ClientFormData.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ClientFormData.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ClientFormData.java
index aa57e935..3658519e 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ClientFormData.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ClientFormData.java
@@ -112,10 +112,13 @@ public final class ClientFormData {
continue;
}
for (int autofillFieldIndex = 0; autofillFieldIndex < autofillFields.size(); autofillFieldIndex++) {
+ SavedAutofillValue savedAutofillValue = hintMap.get(hint);
+ if (savedAutofillValue == null) {
+ continue;
+ }
AutofillField autofillField = autofillFields.get(autofillFieldIndex);
AutofillId autofillId = autofillField.getId();
int autofillType = autofillField.getAutofillType();
- SavedAutofillValue savedAutofillValue = hintMap.get(hint);
switch (autofillType) {
case View.AUTOFILL_TYPE_LIST:
int listValue = autofillField.getAutofillOptionIndex(savedAutofillValue.getTextValue());