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

Commit 24d0241b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/15339924

Change-Id: I68b0a59c03e03ddae29c0d84c26cf6fcbf0e67ed
parents 116c1064 f2b93622
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);