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

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

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

parents 6d9e3c92 af8022d9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -515,6 +515,10 @@ public class SmsController extends ISmsImplBase {
            Uri messageUri, String scAddress, PendingIntent sentIntent,
            PendingIntent deliveryIntent) {
        IccSmsInterfaceManager iccSmsIntMgr = getIccSmsInterfaceManager(subId);
        if (!getCallingPackage().equals(callingPkg)) {
            throw new SecurityException("sendStoredText: Package " + callingPkg
                    + "does not belong to " + Binder.getCallingUid());
        }
        if (iccSmsIntMgr != null) {
            iccSmsIntMgr.sendStoredText(callingPkg, callingAttributionTag, messageUri, scAddress,
                    sentIntent, deliveryIntent);