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

Commit 9e66150d authored by Cassie's avatar Cassie
Browse files

Move SECRET_CODE_ACTION from Telephony.Sms.Intents to TelephonyManager.

Bug: 112440728
Test: Telephony
Change-Id: Ie3f451121a86c4e71abc9680b1496c1a1236418c
parent 7c9f519f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2363,6 +2363,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
                    Uri.parse("android_secret_code://" + code));
            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            mContext.sendBroadcast(intent);

            // {@link TelephonyManager.ACTION_SECRET_CODE} will replace {@link
            // TelephonyIntents#SECRET_CODE_ACTION} in the next Android version. Before
            // that both of these two actions will be broadcast.
            Intent secrectCodeIntent = new Intent(TelephonyManager.ACTION_SECRET_CODE,
                    Uri.parse("android_secret_code://" + code));
            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            mContext.sendBroadcast(secrectCodeIntent);
        }
    }