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

Commit 9926e1c2 authored by Junda Liu's avatar Junda Liu Committed by Jack Yu
Browse files

Allowed broadcast receivers to receive SMS intents

Allow apps in the background to receive WAP_PUSH_RECEIVED_ACTION
and SMS_RECEIVED_ACTION. Carrier privisioning client may depend on
WAP push messages to start or phone number verification app may
depend on sms received intents.

Bug: 36492080
Test: Telephony sanity tests
Merged-In: I720dd12f1987a7e9ebafabaebe2857517f58da9b
Change-Id: I720dd12f1987a7e9ebafabaebe2857517f58da9b
parent cc348d6c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1266,6 +1266,9 @@ public abstract class InboundSmsHandler extends StateMachine {
            if (action.equals(Intents.SMS_DELIVER_ACTION)) {
                // Now dispatch the notification only intent
                intent.setAction(Intents.SMS_RECEIVED_ACTION);
                // Allow registered broadcast receivers to get this intent even
                // when they are in the background.
                intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                intent.setComponent(null);
                // All running users will be notified of the received sms.
                Bundle options = handleSmsWhitelisting(null);
@@ -1277,6 +1280,9 @@ public abstract class InboundSmsHandler extends StateMachine {
                // Now dispatch the notification only intent
                intent.setAction(Intents.WAP_PUSH_RECEIVED_ACTION);
                intent.setComponent(null);
                // Allow registered broadcast receivers to get this intent even
                // when they are in the background.
                intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                // Only the primary user will receive notification of incoming mms.
                // That app will do the actual downloading of the mms.
                Bundle options = null;