[Android] Pass the launched extra when resuming WebAuthenticator #30583
+8
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Sometimes the intermediate activity is finished prematurely and state is lost. By passing the flag directly when resuming we never even need to keep the intermediate activity around.
I am not sure why the activity is finished in some cases, but it may be memory pressure or the OS decides it can. Either way, the only extras we care about is the launched flag. This is set to true to indicate that it has already launched, and then we can just resume the auth and finish.
If you get here and it is NOT launched and the activity is cleaned up, then something else has gone wrong as this activity is only start directly from maui auth with extras, or resumed from app code. It is not an exported activity and cannot be launched from outside the app.
Issues Fixed
Fixes #24692