From 6cf3e7c41116b890104afe31c2688ccf9fadf449 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 16 Apr 2018 12:42:11 -0400 Subject: [PATCH] All users will hear charging sounds. Users will always hear charging sounds UNLESS the ringer is on silent/vibrate OR if dnd is on. Test: manual Bug: 77912907 Change-Id: Ia4e8de0f9de8bbbaf79cd2af8746a269ecb2e8b0 --- services/core/java/com/android/server/power/Notifier.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java index 285532aef71ff..61e82cd2d3394 100644 --- a/services/core/java/com/android/server/power/Notifier.java +++ b/services/core/java/com/android/server/power/Notifier.java @@ -718,14 +718,13 @@ final class Notifier { * Plays the wireless charging sound for both wireless and non-wireless charging */ private void playChargingStartedSound() { - final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(), - Settings.Global.CHARGING_SOUNDS_ENABLED, 1) != 0; + // TODO (b/77912907): add back charging sound enabled check & default to charging sounds ON 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 && dndOff && soundPath != null) { + if (dndOff && soundPath != null) { final Uri soundUri = Uri.parse("file://" + soundPath); if (soundUri != null) { final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);