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

Commit 13241ff2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "SystemUI: Set zen mode to no interruptions if silent mode is set"

parents 33f58707 63b235f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2021,6 +2021,9 @@

    </string-array>

    <!-- Configuartion to set zen mode when silent mode is on -->
    <bool name="config_setZenModeWhenSilentModeOn">false</bool>

    <!-- Configuartion to support ESN Tracker -->
    <bool name="config_telephony_ESN_Tracker_enabled">false</bool>

+1 −0
Original line number Diff line number Diff line
@@ -1618,6 +1618,7 @@
  <java-symbol type="bool" name="config_wifi_background_scan_support" />
  <java-symbol type="bool" name="config_wifi_dual_band_support" />
  <java-symbol type="bool" name="config_wimaxEnabled" />
  <java-symbol type="bool" name="config_setZenModeWhenSilentModeOn" />
  <java-symbol type="bool" name="show_ongoing_ime_switcher" />
  <java-symbol type="color" name="config_defaultNotificationColor" />
  <java-symbol type="color" name="input_method_navigation_guard" />
+4 −1
Original line number Diff line number Diff line
@@ -309,8 +309,11 @@ public class ZenModeHelper {
            final int ringerMode = mAudioManager.getRingerMode();
            int newZen = -1;
            if (ringerMode == AudioManager.RINGER_MODE_SILENT) {
                if (mZenMode == Global.ZEN_MODE_OFF) {
                if (mZenMode == Global.ZEN_MODE_OFF && !mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_setZenModeWhenSilentModeOn)) {
                    newZen = Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
                } else if (mZenMode != Global.ZEN_MODE_NO_INTERRUPTIONS) {
                    newZen = Global.ZEN_MODE_NO_INTERRUPTIONS;
                }
            } else if ((ringerMode == AudioManager.RINGER_MODE_NORMAL
                    || ringerMode == AudioManager.RINGER_MODE_VIBRATE)