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

Commit 37fc7a7f authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

More protected broadcasts.

These actions are owned by the system and should not be sent by
third-party apps for security reasons.

Bug: 27171917, 27169730, 27172357, 27163393
Change-Id: I3161cd3c1c37d26a92723b22878dc5aef6f30c47
parent 2b9eb89a
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@
    <protected-broadcast android:name="com.android.settings.location.MODE_CHANGING" />

    <protected-broadcast android:name="ScheduleConditionProvider.EVALUATE" />
    <protected-broadcast android:name="EventConditionProvider.EVALUATE" />
    <protected-broadcast android:name="wifi_scan_available" />

    <protected-broadcast android:name="action.cne.started" />
@@ -428,6 +429,20 @@
    <protected-broadcast android:name="android.intent.action.ACTION_RADIO_OFF" />
    <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_UNLOCKED" />

    <protected-broadcast android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" />
    <protected-broadcast android:name="com.android.sync.SYNC_CONN_STATUS_CHANGED" />

    <protected-broadcast android:name="com.android.phone.SIP_INCOMING_CALL" />
    <protected-broadcast android:name="com.android.phone.SIP_ADD_PHONE" />
    <protected-broadcast android:name="com.android.phone.SIP_REMOVE_PHONE" />
    <protected-broadcast android:name="com.android.phone.SIP_CALL_OPTION_CHANGED" />

    <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_ACL_CONNECTED" />
    <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_ACL_DISCONNECTED" />

    <protected-broadcast android:name="android.bluetooth.input.profile.action.HANDSHAKE" />
    <protected-broadcast android:name="android.bluetooth.input.profile.action.REPORT" />

    <!-- ====================================================================== -->
    <!--                          RUNTIME PERMISSIONS                           -->
    <!-- ====================================================================== -->
+2 −0
Original line number Diff line number Diff line
@@ -16934,6 +16934,8 @@ public final class ActivityManagerService extends ActivityManagerNative
            if (isProtectedBroadcast
                    || Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
                    || Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action)
                    || Intent.ACTION_GET_PERMISSIONS_COUNT.equals(action)
                    || Intent.ACTION_GET_PERMISSIONS_PACKAGES.equals(action)
                    || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action)
                    || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)
                    || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action)) {
+2 −1
Original line number Diff line number Diff line
@@ -4243,7 +4243,8 @@ public class PackageManagerService extends IPackageManager.Stub {
            } else if (actionName != null) {
                // TODO: remove these terrible hacks
                if (actionName.startsWith("android.net.netmon.lingerExpired")
                        || actionName.startsWith("com.android.server.sip.SipWakeupTimer")) {
                        || actionName.startsWith("com.android.server.sip.SipWakeupTimer")
                        || actionName.startsWith("com.android.internal.telephony.data-reconnect")) {
                    return true;
                }
            }