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

Commit fdcac568 authored by Beverly's avatar Beverly Committed by android-build-merger
Browse files

Charging sounds won't play when dnd is on am: a4539c5c

am: 6691517d

Change-Id: I5d3d58f202e48811343d7b8532f0073d12648339
parents 9f4f0e09 6691517d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -720,9 +720,12 @@ final class Notifier {
    private void playChargingStartedSound() {
        final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.CHARGING_SOUNDS_ENABLED, 1) != 0;
        final boolean dndOff = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS)
                == Settings.Global.ZEN_MODE_OFF;
        final String soundPath = Settings.Global.getString(mContext.getContentResolver(),
                Settings.Global.CHARGING_STARTED_SOUND);
        if (enabled && soundPath != null) {
        if (enabled && dndOff && soundPath != null) {
            final Uri soundUri = Uri.parse("file://" + soundPath);
            if (soundUri != null) {
                final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);