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

Commit 11cd1608 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add back Intent#FLAG_RECEIVER_INCLUDE_BACKGROUND flag when broadcast...

Merge "Add back Intent#FLAG_RECEIVER_INCLUDE_BACKGROUND flag when broadcast intents for secret code."
parents e49fc374 3c05ba25
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -2646,8 +2646,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            options.setBackgroundActivityStartsAllowed(true);
            options.setBackgroundActivityStartsAllowed(true);
            Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION,
            Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION,
                    Uri.parse("android_secret_code://" + code));
                    Uri.parse("android_secret_code://" + code));
            intent.addFlags(
            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND
                    Intent.FLAG_RECEIVER_FOREGROUND);
                    | Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcast(intent, null, options.toBundle());
            mContext.sendBroadcast(intent, null, options.toBundle());


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