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

Commit 005394cd 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

am: 2a44859c

Change-Id: I1462c5cc78001f6be749f518c861c7fcc771f90f
parents 17414d65 2a44859c
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;
    }