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

Commit 6d9e3c92 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check calling package before send sms text." into sc-dev

parents 7ddbc25e 2d0655a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -529,6 +529,10 @@ public class SmsController extends ISmsImplBase {
            Uri messageUri, String scAddress, List<PendingIntent> sentIntents,
            List<PendingIntent> deliveryIntents) {
        IccSmsInterfaceManager iccSmsIntMgr = getIccSmsInterfaceManager(subId);
        if (!getCallingPackage().equals(callingPkg)) {
            throw new SecurityException("sendStoredMultipartText: Package " + callingPkg
                    + " does not belong to " + Binder.getCallingUid());
        }
        if (iccSmsIntMgr != null) {
            iccSmsIntMgr.sendStoredMultipartText(callingPkg, callingAttributionTag, messageUri,
                    scAddress, sentIntents, deliveryIntents);