Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2b02a601 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Update call state type APIs to be multi-user aware.

This fix addresses a bug that was introduced as a result of adding work
profile support into Telecom. Currently, we are not able to silence the
ringer for work calls as the user responsible for doing so would be the
system (i.e. press volume down button). We can allow the system to
silence this call if it has the INTERACT_ACROSS_USERS permission.

This poses an additional problem as the call state APIs are now acting
across users when they should not. Two helper functions were modified in
CallsManager to ensure we are properly filtering calls for respective
user. If the user has the INTERACT_ACROSS_USERS permission, no filtering
is necessary. The call is also visible to the user if the user handle in
the target phone account handle is the same or if the account has
CAPABILITY_MULTI_USER.

The following TelecomManager APIs are being targeted: isInCall,
isInManagedCall, and silenceRinger. The other APIs like isRinging and
the *Permitted APIs already act across users on the device so no change
is required.

Bug: 257953390
Test: Manual, Unit
Change-Id: If0808fab67088e0c487f4cafc5951cdf6ec31582
parent 80a09a11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment