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

Fix unexpected activity finish on configuration change #108

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

MrHadiSatrio
Copy link
Owner

What has changed

ActivityCompletionEventSink now checks for isFinishing and isChangingConfigurations before calling Activity#finish().

Why it was changed

It seems like Activity#finish() would "persist" across configuration change. Meaning, if we call finish() on Activity A1 while it's being destroyed and replaced by Activity A2 because of configuration change, A2 will end up affected by the request.

Finishing an activity does not make much sense if it's in the process
of recreation or has already been finished.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@MrHadiSatrio MrHadiSatrio merged commit 9a6a512 into develop Jul 14, 2023
@MrHadiSatrio MrHadiSatrio deleted the fix/config_change branch July 14, 2023 08:30
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.

1 participant