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

Commit 911d4646 authored by Shuo Qian's avatar Shuo Qian Committed by Tyler Gunn
Browse files

Check callingpackage for calling UID consistency with phoneAccountHandle.

Test: manual
Bug: 192663798
Bug: 192663553
Change-Id: Idd2ea20cd17933f86011b8ddc1037903725c2461
parent 4ce92927
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
            }
+4 −2
Original line number Diff line number Diff line
@@ -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