Skip to content
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

Set the calling activity in ActivityScenario when run in Robolectric. #8613

Merged
merged 1 commit into from Nov 15, 2023

Conversation

copybara-service[bot]
Copy link

Set the calling activity in ActivityScenario when run in Robolectric.

This change makes sure that when you use ActivityScenario.launchActivityForResult, your Activity under test will have getCallingActivity() and getCallingPackage() not null (set to the package of the test).

This is needed, if your Activity wants to make sure, that it is being called for result.

@copybara-service copybara-service bot force-pushed the piper_580945997 branch 3 times, most recently from 65fb55b to 5b337e5 Compare November 15, 2023 00:32
This change makes sure that when you use ActivityScenario.launchActivityForResult, your Activity under test will have getCallingActivity() and getCallingPackage() not null (set to the package of the test).

This is needed, if your Activity wants to make sure, that it is being called for result.

PiperOrigin-RevId: 582479442
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.

None yet

1 participant