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

Commit 80c5a22a authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Allow broadcast receivers to receive SMS_REJECTED_ACTION.

Allow apps in the background to receive SMS_REJECTED_ACTION as
that behavior is consistent with SMS_RECEIVED_ACTION. Both
intents should eventually be deprecated, but for now keeping
behavior same for both.

Test: Basic telephony sanity
Bug: 37156623
Change-Id: Iad19510998e1e88f8e09f2763fa98b7355af4dee
parent f0dfcc5f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -643,6 +643,9 @@ public abstract class InboundSmsHandler extends StateMachine {
            // broadcast SMS_REJECTED_ACTION intent
            Intent intent = new Intent(Intents.SMS_REJECTED_ACTION);
            intent.putExtra("result", result);
            // Allow registered broadcast receivers to get this intent even
            // when they are in the background.
            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            mContext.sendBroadcast(intent, android.Manifest.permission.RECEIVE_SMS);
        }
        acknowledgeLastIncomingSms(success, result, response);