Merge "Check callingpackage for calling UID consistency with phoneAccountHandle."

This commit is contained in:
Shuo Qian
2021-08-03 19:43:31 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 4 deletions

View File

@@ -2430,7 +2430,8 @@ public class TelecomManager {
ITelecomService service = getTelecomService();
if (service != null) {
try {
return service.isIncomingCallPermitted(phoneAccountHandle);
return service.isIncomingCallPermitted(phoneAccountHandle,
mContext.getOpPackageName());
} catch (RemoteException e) {
Log.e(TAG, "Error isIncomingCallPermitted", e);
}
@@ -2463,7 +2464,8 @@ public class TelecomManager {
ITelecomService service = getTelecomService();
if (service != null) {
try {
return service.isOutgoingCallPermitted(phoneAccountHandle);
return service.isOutgoingCallPermitted(phoneAccountHandle,
mContext.getOpPackageName());
} catch (RemoteException e) {
Log.e(TAG, "Error isOutgoingCallPermitted", e);
}

View File

@@ -306,12 +306,14 @@ interface ITelecomService {
/**
* @see TelecomServiceImpl#isIncomingCallPermitted
*/
boolean isIncomingCallPermitted(in PhoneAccountHandle phoneAccountHandle);
boolean isIncomingCallPermitted(in PhoneAccountHandle phoneAccountHandle,
String callingPackage);
/**
* @see TelecomServiceImpl#isOutgoingCallPermitted
*/
boolean isOutgoingCallPermitted(in PhoneAccountHandle phoneAccountHandle);
boolean isOutgoingCallPermitted(in PhoneAccountHandle phoneAccountHandle,
String callingPackage);
/**
* @see TelecomServiceImpl#waitOnHandler