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

Commit 2a44859c authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge \"Always apply config updates.\" into mnc-dr-dev

am: f437bd06

Change-Id: I899b923c075a5f3351c4791a23a94adf123d1247
parents b281795c f437bd06
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -332,13 +332,15 @@ public class ZenModeHelper {
        }
        mConditions.evaluateConfig(config, false /*processSubscriptions*/);  // may modify config
        mConfigs.put(config.user, config);
        if (config.equals(mConfig)) return true;
        if (DEBUG) Log.d(TAG, "setConfig reason=" + reason, new Throwable());
        ZenLog.traceConfig(reason, mConfig, config);
        final boolean policyChanged = !Objects.equals(getNotificationPolicy(mConfig),
                getNotificationPolicy(config));
        boolean configChanged = !config.equals(mConfig);
        mConfig = config;
        if (configChanged) {
            dispatchOnConfigChanged();
        }
        if (policyChanged) {
            dispatchOnPolicyChanged();
        }
@@ -372,9 +374,9 @@ public class ZenModeHelper {

    private boolean evaluateZenMode(String reason, boolean setRingerMode) {
        if (DEBUG) Log.d(TAG, "evaluateZenMode");
        final int zenBefore = mZenMode;
        final ArraySet<ZenRule> automaticRules = new ArraySet<ZenRule>();
        final int zen = computeZenMode(automaticRules);
        if (zen == mZenMode) return false;
        ZenLog.traceSetZenMode(zen, reason);
        mZenMode = zen;
        updateRingerModeAffectedStreams();
@@ -383,7 +385,9 @@ public class ZenModeHelper {
            applyZenToRingerMode();
        }
        applyRestrictions();
        if (zen != zenBefore) {
            mHandler.postDispatchOnZenModeChanged();
        }
        return true;
    }