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

Commit cb9a1d0f authored by Jeff Davidson's avatar Jeff Davidson Committed by android-build-merger
Browse files

Merge "Add FLAG_RECEIVER_FOREGROUND to secret code broadcasts."

am: 3d427d99

Change-Id: Ibcb9813334f635af0e4713bfbf293b42ea28c5f6
parents edbb8a38 3d427d99
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2585,7 +2585,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            options.setBackgroundActivityStartsAllowed(true);
            Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION,
                    Uri.parse("android_secret_code://" + code));
            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            intent.addFlags(
                    Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND | Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcast(intent, null, options.toBundle());

            // {@link TelephonyManager.ACTION_SECRET_CODE} will replace {@link
@@ -2593,7 +2594,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            // that both of these two actions will be broadcast.
            Intent secrectCodeIntent = new Intent(TelephonyManager.ACTION_SECRET_CODE,
                    Uri.parse("android_secret_code://" + code));
            secrectCodeIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            secrectCodeIntent.addFlags(
                    Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND | Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcast(secrectCodeIntent, null, options.toBundle());
        }
    }