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

Commit b8e4bbe7 authored by Daniel Bright's avatar Daniel Bright
Browse files

Secret code fix - remove bground flag

There were two CLs that conflicted causing
the functionality to break again.  This CL removes
Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND.  This is Ok
because the flag is in framework-sysconfig.xml.
ActivityManagerService.java ln:15772 checks for this flag and
then adds it.

Test: Brought up "Testing" activity using secret code
Test: Set (and then hit) breakpoint in ActivityManagerService.java
Bug: 149524255
Merged-In: I81e6868a46453925fbcc9a1fb9bf6fca30a92ce5
Change-Id: I81e6868a46453925fbcc9a1fb9bf6fca30a92ce5
parent 9f0afd7a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2655,8 +2655,7 @@ 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.FLAG_RECEIVER_FOREGROUND);
            intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcast(intent, null, options.toBundle());

            // {@link TelephonyManager.ACTION_SECRET_CODE} will replace {@link
@@ -2664,8 +2663,7 @@ 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 | Intent.FLAG_RECEIVER_FOREGROUND);
            secrectCodeIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcast(secrectCodeIntent, null, options.toBundle());
        }
    }