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

Commit 7fe88ee4 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Protect MAP Client message broadcasts with RECEIVE_SMS permission

Test: compilation
Bug: 177238342
Merged-In: Ie9984a95aa204710519da049819464875084900b
Change-Id: I80fa47b81e99cc43b432d01c88ff42e06d7647e1
parent 5fd89df7
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import android.net.Uri;
import android.os.Message;
import android.os.ParcelUuid;
import android.provider.ContactsContract;
import android.provider.Telephony;
import android.telecom.PhoneAccount;
import android.util.Log;

@@ -528,7 +529,12 @@ final class MceStateMachine extends StateMachine {
                        intent.putExtra(BluetoothMapClient.EXTRA_SENDER_CONTACT_NAME,
                                originator.getDisplayName());
                    }
                    mService.sendBroadcast(intent);
                    // Only send to the current default SMS app if one exists
                    String defaultMessagingPackage = Telephony.Sms.getDefaultSmsPackage(mService);
                    if (defaultMessagingPackage != null) {
                        intent.setPackage(defaultMessagingPackage);
                    }
                    mService.sendBroadcast(intent, android.Manifest.permission.RECEIVE_SMS);
                    break;

                case MMS: