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

Commit 63b0318e authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Protect some more broadcasts."

parents 0f84c903 4267eacc
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -369,6 +369,22 @@
    <protected-broadcast android:name="ScheduleConditionProvider.EVALUATE" />
    <protected-broadcast android:name="wifi_scan_available" />

    <protected-broadcast android:name="action.cne.started" />
    <protected-broadcast android:name="android.appwidget.action.APPWIDGET_UPDATE" />
    <protected-broadcast android:name="android.content.jobscheduler.JOB_DEADLINE_EXPIRED" />
    <protected-broadcast android:name="android.intent.action.ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW" />
    <protected-broadcast android:name="android.location.HIGH_POWER_REQUEST_CHANGE" />
    <protected-broadcast android:name="android.location.HIGH_POWER_REQUEST_CHANGE" />
    <protected-broadcast android:name="android.net.conn.CONNECTIVITY_CHANGE_SUPL" />
    <protected-broadcast android:name="android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED" />
    <protected-broadcast android:name="android.os.action.LIGHT_DEVICE_IDLE_MODE_CHANGED" />
    <protected-broadcast android:name="android.os.storage.action.VOLUME_STATE_CHANGED" />
    <protected-broadcast android:name="com.android.server.action.UPDATE_TWILIGHT_STATE" />
    <protected-broadcast android:name="com.android.server.device_idle.STEP_IDLE_STATE" />
    <protected-broadcast android:name="com.android.server.device_idle.STEP_LIGHT_IDLE_STATE" />
    <protected-broadcast android:name="com.android.server.Wifi.action.TOGGLE_PNO" />
    <protected-broadcast android:name="intent.action.ACTION_RF_BAND_INFO" />

    <!-- ====================================================================== -->
    <!--                          RUNTIME PERMISSIONS                           -->
    <!-- ====================================================================== -->
+6 −4
Original line number Diff line number Diff line
@@ -4086,12 +4086,14 @@ public class PackageManagerService extends IPackageManager.Stub {
        synchronized (mPackages) {
            if (mProtectedBroadcasts.contains(actionName)) {
                return true;
            } else if (actionName != null
                    && actionName.startsWith("android.net.netmon.lingerExpired")) {
                // TODO: remove this terrible hack
            } else if (actionName != null) {
                // TODO: remove these terrible hacks
                if (actionName.startsWith("android.net.netmon.lingerExpired")
                        || actionName.startsWith("com.android.server.sip.SipWakeupTimer")) {
                    return true;
                }
            }
        }
        return false;
    }