feat(android): honor mediaCapturePermissionGrantType="deny" (AGE-378)#46
Closed
alexz-phantom wants to merge 1 commit into
Closed
feat(android): honor mediaCapturePermissionGrantType="deny" (AGE-378)#46alexz-phantom wants to merge 1 commit into
alexz-phantom wants to merge 1 commit into
Conversation
Android previously ignored the `mediaCapturePermissionGrantType` prop in the dApp browser WebView fork — the native setter was a no-op. Implement the minimal native enforcement the dApp browser contract needs: - Persist the prop value in RNCWebChromeClient and propagate it through both the new- and old-architecture managers and RNCWebViewManagerImpl. - Short-circuit RNCWebChromeClient.onPermissionRequest for `deny`: call request.deny() and return before reading requested resources, showing the site-attributed AlertDialog, or triggering an OS CAMERA/RECORD_AUDIO request. - Any other value (including the default prompt) preserves existing Android behavior; iOS behavior is unchanged. - Add a JVM unit test proving the deny short-circuit, plus the JUnit/Mockito test deps and testOptions to run it. - Expose the prop on AndroidWebViewProps, update docs, and add a changeset. Co-authored-by: Alexandra Zinkus <214535469+alexz-phantom@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughThis PR adds Android-native enforcement of ChangesAndroid deny media capture permission
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Android previously ignored the
mediaCapturePermissionGrantTypeprop in the dApp browser WebView fork — the native setter was a no-op. Implement the minimal native enforcement the dApp browser contract needs:deny: call request.deny() and return before reading requested resources, showing the site-attributed AlertDialog, or triggering an OS CAMERA/RECORD_AUDIO request.Summary by CodeRabbit
New Features
denyoption now blocks camera/microphone prompts on Android, while other values keep the existing prompt behavior.Documentation
Tests