-
Notifications
You must be signed in to change notification settings - Fork 98
Metadata cleanups for datastore and autofill. #1102
Conversation
This will check the updated item to check if the password has changed and update the time accordingly.
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.
Looks good! I have a few questions, but pending those I am happy to ✅
if (isRunning) { | ||
// we might have already been called when logging | ||
// a previously chosen dataset. | ||
return | ||
} |
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.
Makes sense. Do we maybe want to fail/throw an exception here instead of just returning?
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.
initializeService
can be called twice. This makes sure it's idempotent (i.e. we only actually initialized once).
ServerPassword( | ||
id = emptyId, | ||
hostname = domain, | ||
username = capturedUsername, | ||
password = capturedPassword, | ||
formSubmitURL = parsedStructure.webDomain ?: domain | ||
formSubmitURL = webDomain ?: domain |
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.
Is there a formal definition for what the formSubmitURL
should be somewhere?
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.
It's the formActionOrigin
, which we don't get. We assume here that it's the origin of the page itself (which we do), and is likely given it's a login page.
val structure = request.fillContexts.last().structure | ||
val activityPackageName = structure.activityComponent.packageName | ||
if (this.packageName == activityPackageName) { | ||
callback.onSuccess(null) | ||
callback.onFailure(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.
Why are these being changed from success -> failure?
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.
It's a bit debatable whether this is a failure or success.
But from the look of the event history, not having any fillable things is likely to be a failure.
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.
🚀 Thanks for answering my questions! This looks great!
* Touch items as they are used to autofill * Add a scheme to the form action origin / formSubmitURL * Added original credential to the updateItem flow This will check the updated item to check if the password has changed and update the time accordingly. * gradlew lint
Fixes #1064.
This PR does a number of related things, each too small for their own PR:
timePasswordChanged
field to be updated.