-
Notifications
You must be signed in to change notification settings - Fork 104
Fixup no-username bugs (crash and string change) #496
Conversation
d5e7101
to
d6f76ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about what the intent of this card is. Does this actually fix the auto-generated code? And was that the only issue causing the crash?
setTextViewText(R.id.hostname, title) | ||
} | ||
|
||
datasetBuilder.setValue( | ||
it, | ||
AutofillValue.forText(credential.username), | ||
AutofillValue.forText(credential.username ?: ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when the credential.username
is null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the credential.username
is null
, the empty string is used instead.
This means that the input field would be filled with the empty string rather than "null" (i.e. null.toString()
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eliserichards I've added steps to reproduce in the original issue #488. Please review when ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🥇
Fixes #488.
This PR fixes a crash caused by
kotlinx.android
auto generated code being incorrectly generated and incorrectly used. This PR does not address the generated code, which allowed:to be used, which resolves to
null
.It also addresses an issue in autofill which caused strings containing "null" in display strings for autofill.