fix(android): avoid phone-number permission for self-managed incoming calls - #876
Merged
sboily merged 1 commit intoSep 14, 2026
Conversation
… calls Carry the self-managed flag on incoming and outgoing ConnectionRequests. The flag approach follows PR react-native-webrtc#685 by Donald Wong and covers the incoming path as well.
manuquentin
approved these changes
Sep 14, 2026
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.
An incoming call with
selfManaged: truecrashes on recent Android versions whenREAD_PHONE_NUMBERSis denied.VoiceConnectionService.createConnection()callsTelecomManager.getPhoneAccount()even for the app's own self-managed account, although CallKeep's self-managed permission flow does not request that permission.Capture the self-managed flag in both incoming and outgoing connection requests, then set the connection property without querying the phone account. Requests without that flag keep the existing account lookup. This follows Donald Wong's approach in #685 and extends it to
displayIncomingCall, which is the path reproduced here; #685 currently adds the flag only to outgoing calls.Validation: the included host-app instrumentation fixture submits an actual incoming call through Android Telecom, checks that phone-number permission is denied, verifies
PROPERTY_SELF_MANAGED, and rejects the connection in cleanup. It passes on Samsung SM-S921W (API 36) and Pixel Tablet (API 37), using React Native 0.87.1. Both devices crashed at the account lookup on unmodified 4.3.17. No microphone or network/media session is started by the fixture; outgoing calls were not exercised on device.