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

Commit 9a25da19 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Send less unnecessary broadcasts.

Protect the broadcasts we do send.

Change-Id: I440a7accfc4509512063b663c0418a29f06ef09e
parent 41a324eb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -383,6 +383,12 @@
    <protected-broadcast android:name="com.android.server.Wifi.action.TOGGLE_PNO" />
    <protected-broadcast android:name="intent.action.ACTION_RF_BAND_INFO" />

    <protected-broadcast android:name="android.app.action.INTERRUPTION_FILTER_CHANGED" />
    <protected-broadcast android:name="android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL" />
    <protected-broadcast android:name="android.app.action.NOTIFICATION_POLICY_CHANGED" />
    <protected-broadcast android:name="android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED" />
    <protected-broadcast android:name="android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED" />

    <!-- ====================================================================== -->
    <!--                          RUNTIME PERMISSIONS                           -->
    <!-- ====================================================================== -->
+2 −2
Original line number Diff line number Diff line
@@ -570,13 +570,13 @@ public class ZenModeHelper {
            ZenLog.traceConfig(reason, mConfig, config);
            final boolean policyChanged = !Objects.equals(getNotificationPolicy(mConfig),
                    getNotificationPolicy(config));
            mConfig = config;
            if (config.equals(mConfig)) {
            if (!config.equals(mConfig)) {
                dispatchOnConfigChanged();
            }
            if (policyChanged) {
                dispatchOnPolicyChanged();
            }
            mConfig = config;
            final String val = Integer.toString(config.hashCode());
            Global.putString(mContext.getContentResolver(), Global.ZEN_MODE_CONFIG_ETAG, val);
            if (!evaluateZenMode(reason, setRingerMode)) {