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

Commit 47d8bf24 authored by arcwang's avatar arcwang
Browse files

Add flag Intent.FLAG_RECEIVER_FOREGROUND to emergency cellbroadcast intent.

The flag can avoid emergency cellbroadcast intents from been blocked in background intent queue when
there is an intent queue traffic jam.

Bug: 113302333
Test: make
Change-Id: I074590d9e41c636e46796c8e01a1e74c18ef308d
parent 1c26f71f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ public class CellBroadcastHandler extends WakeLockStateMachine {
            log(msg);
            mLocalLog.log(msg);
            intent = new Intent(Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION);
            //Emergency alerts need to be delivered with high priority
            intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            // Explicitly send the intent to the default cell broadcast receiver.
            intent.setPackage(mContext.getResources().getString(
                    com.android.internal.R.string.config_defaultCellBroadcastReceiverPkg));