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

Commit 674b7854 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Clear calling identity before sending text

Bug: 324459111
Test: build
Change-Id: Ic987500dfea848e02f553e6c681f360fc3e1d071
parent 9717482e
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -302,15 +302,16 @@ public class SmsController extends ISmsImplBase {
        SubscriptionInfo info;
        try {
            info = getSubscriptionInfo(subId);
        } finally {
            Binder.restoreCallingIdentity(token);
        }

            if (isBluetoothSubscription(info)) {
                sendBluetoothText(info, destAddr, text, sentIntent, deliveryIntent);
            } else {
            sendIccText(subId, callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent,
                    persistMessageForNonDefaultSmsApp, messageId, skipShortCodeCheck);
                sendIccText(subId, callingPackage, destAddr, scAddr, text, sentIntent,
                        deliveryIntent, persistMessageForNonDefaultSmsApp, messageId,
                        skipShortCodeCheck);
            }
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }