Skip to content

Await foreground activity during sign in #3340

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 5 commits into from
Jan 24, 2022

Conversation

lfkellogg
Copy link
Contributor

No description provided.

@lfkellogg lfkellogg changed the title Await foreground activity during sign in WIP - await foreground activity during sign in Jan 21, 2022
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 21, 2022

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from 73.56% (2715647) to 73.38% (c4845e2) by -0.18%.

    FilenameBase (2715647)Merge (c4845e2)Diff
    AutoValue_TaskUtils_CombinedTaskResults.java?33.33%?
    FirebaseAppDistributionException.java86.67%88.24%+1.57%
    TaskUtils.java93.75%94.29%+0.54%
    TesterSignInManager.java89.66%93.75%+4.09%

Test Logs

Notes

  • Commit (c4845e2) is created by Prow via merging PR base commit (2715647) and head commit (7014aa2).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/1hOIWbPlvr.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 21, 2022

Size Report 1

Affected Products

  • firebase-appdistribution

    TypeBase (2715647)Merge (c4845e2)Diff
    aar121 kB124 kB+2.94 kB (+2.4%)
    apk (aggressive)739 kB740 kB+28 B (+0.0%)
    apk (release)1.55 MB1.55 MB+980 B (+0.1%)

Test Logs

Notes

  • Commit (c4845e2) is created by Prow via merging PR base commit (2715647) and head commit (7014aa2).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/Pe0TUcCggN.html

Copy link

@rachaprince rachaprince left a comment

Choose a reason for hiding this comment

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

makes sense so far!

* Returns a {@link SuccessContinuation} to be chained off of a {@link Task}, that will run
* another task in sequence and combine both results together.
*
* <p>This is useful when you want to run two tasks and use the results of each, but those tasks

Choose a reason for hiding this comment

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

Great docs!

@lfkellogg lfkellogg requested a review from mrichards January 21, 2022 19:53
@lfkellogg lfkellogg force-pushed the lk/sign-in-intent-from-background branch 3 times, most recently from 37bd9f4 to 5731f60 Compare January 21, 2022 21:03
@lfkellogg lfkellogg force-pushed the lk/sign-in-intent-from-background branch from 5731f60 to 053c019 Compare January 21, 2022 21:10
@lfkellogg lfkellogg changed the title WIP - await foreground activity during sign in Await foreground activity during sign in Jan 21, 2022
@lfkellogg lfkellogg changed the title Await foreground activity during sign in WIP - Await foreground activity during sign in Jan 24, 2022
@lfkellogg
Copy link
Contributor Author

Please hold off on reviewing, I think I need to tweak this a bit.

@lfkellogg lfkellogg force-pushed the lk/sign-in-intent-from-background branch from a5076fd to c14fd98 Compare January 24, 2022 15:39
@lfkellogg lfkellogg changed the title WIP - Await foreground activity during sign in Await foreground activity during sign in Jan 24, 2022
@lfkellogg
Copy link
Contributor Author

OK this is ready for review

ErrorMessages.AUTHENTICATION_ERROR, AUTHENTICATION_FAILURE, e));
});
handleTaskFailure(ErrorMessages.AUTHENTICATION_ERROR, Status.AUTHENTICATION_FAILURE))
.onSuccessTask(combineWithResultOf(() -> lifecycleNotifier.getForegroundActivity()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be ok in the case where we get the activity but we don't have the lock and once we get the lock the activity changes?

Foreground activity with no lock-> Lock granted -> Different foreground activity is now there but we continue now that we have the lock.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh great catch! That would break. I'll see what I can do about that.

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 made a change in the success listener below, and left some clarifying comments. I think that helps but let me know what you think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

@lfkellogg lfkellogg merged commit d1d5b47 into master Jan 24, 2022
@lfkellogg lfkellogg deleted the lk/sign-in-intent-from-background branch January 24, 2022 20:39
@firebase firebase locked and limited conversation to collaborators Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants