From 2580a5ee55d73510767ad48ad5685d9b5cf490a5 Mon Sep 17 00:00:00 2001 From: Marcel Dopita Date: Mon, 27 Oct 2014 18:10:25 +0100 Subject: Disabling "Charging sounds" should prevent wireless sound as well This is a fix for CYAN-4689 and also partial fix for CYAN-812. As noted in CYAN-812, separate section may not be a bad idea but the "Vibrate" checkbox already works with wireless charging so the sound settings should be allowed as well. There is no other (non complex) way for users to disable "wireless charging started" sound without modifying Android system. Change-Id: I3311b94a7771863e49c1f83049600377dcf52d45 --- services/java/com/android/server/power/Notifier.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/power/Notifier.java b/services/java/com/android/server/power/Notifier.java index 264e2e9c3b1..cb6bf920777 100644 --- a/services/java/com/android/server/power/Notifier.java +++ b/services/java/com/android/server/power/Notifier.java @@ -538,7 +538,9 @@ final class Notifier { break; case MSG_WIRELESS_CHARGING_STARTED: - playWirelessChargingStartedSound(); + if (Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.POWER_NOTIFICATIONS_ENABLED, 1) != 0) + playWirelessChargingStartedSound(); break; } } -- cgit v1.2.3