diff options
author | 2023-04-05 16:59:01 -0700 | |
---|---|---|
committer | 2023-04-06 09:30:47 -0700 | |
commit | f959db09562014a578c46926bb5e438d5d1e1814 (patch) | |
tree | 498dfecc4c3a3e90547a9a6301c3086c8a7ef892 | |
parent | 6773f05a209995c096ef9c733af552b80d757b3b (diff) |
fix security exception in VoipCallMonitor
While investigating how the VoipCallMonitor class treats transactional
calls, I noticed a security exception was being thrown whenever
startForegroundServiceDelegate was being called. Upon some further
digging, an incorrect UID was being given to the activity manager class.
The fix is to fetch the UID in TelecomServiceImpl#addCall and store it
in the extras. Then, when the call is created in CallsManager, those
values are stored in the Call object. VoipCallMonitor can then query the
value and there is no longer a security exception.
Fixes: 276802273
Test: manual (start T-call and grep VoipCallMonitor)
+ unit test (ensure the CallingPackageIdentity is being set)
Change-Id: I10a22df721d1c9c6f467a24fed2d1204e0db843f
-rw-r--r-- | telecomm/java/android/telecom/CallAttributes.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/CallAttributes.java b/telecomm/java/android/telecom/CallAttributes.java index f3ef834168b5..52ff90f38113 100644 --- a/telecomm/java/android/telecom/CallAttributes.java +++ b/telecomm/java/android/telecom/CallAttributes.java @@ -59,7 +59,10 @@ public final class CallAttributes implements Parcelable { public static final String CALL_CAPABILITIES_KEY = "TelecomCapabilities"; /** @hide **/ - public static final String CALLER_PID = "CallerPid"; + public static final String CALLER_PID_KEY = "CallerPid"; + + /** @hide **/ + public static final String CALLER_UID_KEY = "CallerUid"; private CallAttributes(@NonNull PhoneAccountHandle phoneAccountHandle, @NonNull CharSequence displayName, |