Skip to content

Various bugfixes for 1.0 #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 26, 2016

Conversation

amandle
Copy link
Contributor

@amandle amandle commented Oct 26, 2016

Did a manual run through of a bunch of test cases and uncovered some issues which have been fixed here. As well as addressed some internal feedback we received.

fixed:

}

private void finish(int resultCode, Intent data) {
mActivity.finish(resultCode, data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to do some more refactoring for this to work. The reason I chose not to pass down the resultCode is because SmartLock used to be an Activity called by other activities (such as RegisterEmailActivity). Those activities didn't care about what the result code was and always returned Activity.RESULT_OK. Say you start the email flow through AuthMethodPickerActivity and end up at RegisterEmailActivity which calls this smart lock code. If saving the credential fails,RegisterEmailActivity will be finished with Activity.RESULT_CANCELED. However, the user is signed in and this line in AuthMethodPickerActivity will prevent the activity from finishing even though the user is singed in. I don't think this is expected behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, but since the resultCode was being ignored finish(RESULT_CANCELLED) like on line 167 would result in finish(RESULT_OK) being called. Maybe it would make sense to change line 167 and line 174 to call finish(RESULT_OK) directly instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other lines I missed that would need to change to RESULT_OK as well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is probably going to be a point of confusion in the future, I think we should just remove the option to set a result at all and always pass down RESULT_OK. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me, done!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@samtstern
Copy link
Contributor

LGTM

@amandle amandle merged commit 2b9020b into firebase:version-1.0.0-dev Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants