Skip to content

Android / Calling account permission is lost between restarts #8

@adigeo

Description

@adigeo

Symptom

Calling account permission is lost between restarts.

Investigation

Investigation into the removal of the PhoneAccount (Calling Account in the Phone App Settings) on reboot on Android has shown that the Phone app doesn't like PhoneAccounts made with the SIP SCHEME enabled on them if there isn't a corresponding SIP profile in the Phone App's file based database.

Heres the OS code that actually removes our account:

https://android.googlesource.com/platform/packages/services/Telephony/+/refs/heads/android11-release/sip/src/com/android/services/telephony/sip/SipAccountRegistry.java#128

This is the code that saves to that file....

https://android.googlesource.com/platform/packages/services/Telephony/+/refs/heads/android11-release/sip/src/com/android/services/telephony/sip/SipProfileDb.java#97

Its my belief that this assumption about the SIP SCHEME usage is just plain wrong so I'll be making a bug reporting it; but this leaves me in a position of not knowing what to do next. One option would be to just replace sip: with tel: so that we can use a PhoneAccount without our addition of sip: scheme.

Follow up

25 Mar 2021. I finally got to checking if self managed accounts get treated in the same way; and they don't; they don't get deleted - so it looks wise to move over to self managed connection service.

https://developer.android.com/guide/topics/connectivity/telecom/selfManaged

There is a Pull Request open for it... react-native-webrtc/react-native-callkeep#310

6 Apr 2021. Implemented self managed mode support for Android

react-native-webrtc/react-native-callkeep#395

Deliverable

Produce a patch that can be merged with either Sylk-mobile or CallKeep to preserve the account permissions at start.

Use the patch-package module to integrate the patch inside the project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions