forward fix VoipCallMonitor regression
All the voip tests that verify FGS is gained started failing.
Upon investigation, a recent change mistakenly passed in the
UID instead of PID. This caused the ActiveService class to
hit a NPE when granting FGS.
Flag: EXEMPT fixes regression
Fixes: 397823061
Test: atest android.telecom.cts.cuj.app.integration.
CallStyleNotificationsTest
#testFGS_twoCalls_TransactionalVoipAppMain
Change-Id: If08a4c1c2b350b116b95f825a42198dd7347b145
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index 9d1a382..7bb041d 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -198,6 +198,7 @@
public void addCall(CallAttributes callAttributes, ICallEventCallback callEventCallback,
String callId, String callingPackage) {
int uid = Binder.getCallingUid();
+ int pid = Binder.getCallingPid();
ApiStats.ApiEvent event = new ApiStats.ApiEvent(ApiStats.API_ADDCALL,
uid, ApiStats.RESULT_PERMISSION);
try {
@@ -217,7 +218,7 @@
// add extras about info used for FGS delegation
Bundle extras = new Bundle();
extras.putInt(CallAttributes.CALLER_UID_KEY, uid);
- extras.putInt(CallAttributes.CALLER_PID_KEY, uid);
+ extras.putInt(CallAttributes.CALLER_PID_KEY, pid);
CompletableFuture<CallTransaction> transactionFuture;