Activity Leak in PermissionsControllerImpl during Configuration Change Fix#182
Merged
Alex009 merged 1 commit intoicerockdev:developfrom Aug 28, 2025
Merged
Conversation
Alex009
requested changes
Aug 20, 2025
…unregistering launcher on activity destroy
53cfaf7 to
b53fa91
Compare
Alex009
approved these changes
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is a proposed fix for the issue #181
Proposed Solution
The following changes are made to the
PermissionsControllerImpl:suspendCoroutineOpen to discussion:
At the start of the
bind()method, there is anunbindActivity()method invocation to unbind previously bound Activity if developers mistakenly invoke the bind() method more times for different Activities - Android MultiWindow?We could throw an exception there instead to signal to developers that they may be making a mistake instead.
Most Important
These changes do not change a behaviour of the
PermissionControllerImplor the API in any way to keep it backwards compatible.