fix: prevent intent flag overwrite in playVideo#18
Merged
Conversation
8 tasks
alexgerardojacinto
approved these changes
Jul 8, 2026
Contributor
|
Tested it here and it works properly, merging this PR so this can be released with #17 |
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.
Description
Combines
FLAG_ACTIVITY_NO_HISTORYandFLAG_GRANT_READ_URI_PERMISSIONinto a singleintent.flagsassignment usingorinIONCAMRVideoManager.playVideo.Context
In
playVideo, two consecutive direct assignments tointent.flagswere used:Because each
=assignment replaces the full flags value, the second line silently discardedFLAG_ACTIVITY_NO_HISTORY, meaning the external video player was left in the activity back stack contrary to the intended behaviour.FLAG_GRANT_READ_URI_PERMISSIONwas present in the final value, so URI access worked — but the no-history behaviour was never applied.Discovered while testing RMET-5241.
Type of changes
Tests
I replaced the
.aarin a Cordova app, and testing playing video with different Android apps. I didn't notice any change in behavior, most likely because they were triggered from a single activity / screen, and there was no backstack. So in worst case scenario this change is a no-op, but the fix still makes sense.Checklist