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

Commit 8acac15c authored by Daniel Bright's avatar Daniel Bright
Browse files

Whitelist telephony broadcasts for bground use

Whitelisted telephony broadcasts using the intent background flag.
Ensured that each broadcast was protected manually through cts test below.

Bug: 148181747
Test: Switched on ActivityManagerDebugConfig.DEBUG_BACKGROUND_CHECK for SIM_STATE_CHANGED
Test:  android.telephony.cts.TelephonyProtectedBroadcastsTest
Change-Id: Id280fc2128b84dda2a8184dfa32ecc5b8f787afb
parent 6923cdd8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ public class CellBroadcastIntents {
            int initialCode, int slotIndex) {
        Intent backgroundIntent = new Intent(Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION);
        backgroundIntent.putExtra(EXTRA_MESSAGE, smsCbMessage);
        backgroundIntent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
        putPhoneIdAndSubIdExtra(context, backgroundIntent, slotIndex);

        String receiverPermission = Manifest.permission.RECEIVE_SMS;
+21 −3
Original line number Diff line number Diff line
@@ -19,11 +19,29 @@

    <!-- Broadcast actions that are currently exempted from O+ background
         delivery restrictions. -->
    <allow-implicit-broadcast action="android.intent.action.SIM_STATE_CHANGED" />
    <allow-implicit-broadcast action="android.intent.action.PACKAGE_CHANGED" />
    <allow-implicit-broadcast action="android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED" />
    <allow-implicit-broadcast action="android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED" />
    <allow-implicit-broadcast action="android.intent.action.DATA_SMS_RECEIVED" />
    <allow-implicit-broadcast action="android.intent.action.MEDIA_SCANNER_SCAN_FILE" />
    <allow-implicit-broadcast action="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION" />
    <allow-implicit-broadcast action="android.intent.action.PACKAGE_CHANGED" />
    <allow-implicit-broadcast action="android.intent.action.SIM_STATE_CHANGED" />
    <allow-implicit-broadcast action="android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION" />
    <allow-implicit-broadcast action="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION" />
    <allow-implicit-broadcast action="android.provider.Telephony.SECRET_CODE" />
    <allow-implicit-broadcast action="android.provider.Telephony.SMS_CB_RECEIVED" />
    <allow-implicit-broadcast action="android.provider.Telephony.SMS_DELIVER" />
    <allow-implicit-broadcast action="android.provider.Telephony.SMS_RECEIVED" />
    <allow-implicit-broadcast action="android.provider.Telephony.SMS_REJECTED" />
    <allow-implicit-broadcast action="android.provider.Telephony.WAP_PUSH_DELIVER" />
    <allow-implicit-broadcast action="android.provider.Telephony.WAP_PUSH_RECEIVED" />
    <allow-implicit-broadcast action="android.telephony.action.CARRIER_CONFIG_CHANGED" />
    <allow-implicit-broadcast action="android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED" />
    <allow-implicit-broadcast action="android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED" />
    <allow-implicit-broadcast action="android.telephony.action.SECRET_CODE" />
    <allow-implicit-broadcast action="android.telephony.action.SIM_APPLICATION_STATE_CHANGED" />
    <allow-implicit-broadcast action="android.telephony.action.SIM_CARD_STATE_CHANGED" />
    <allow-implicit-broadcast action="android.telephony.action.SIM_SLOT_STATUS_CHANGED" />


    <!-- Whitelist of what components are permitted as backup data transports.  The
         'service' attribute here is a flattened ComponentName string. -->