Check callingpackage for calling UID consistency with phoneAccountHandle.
Test: manual Bug: 192663798 Bug: 192663553 Change-Id: Idd2ea20cd17933f86011b8ddc1037903725c2461
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user