diff options
author | Marcel Dopita <m@rcel.cz> | 2014-10-27 18:10:25 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2014-11-26 04:01:08 +0000 |
commit | 2580a5ee55d73510767ad48ad5685d9b5cf490a5 (patch) | |
tree | 3c67ff10826978994b5e242c00fe92e8eeb6c718 | |
parent | d604ab35afea00f0d06a9235cf3fe5cc6edf441b (diff) | |
download | android_frameworks_base-2580a5ee55d73510767ad48ad5685d9b5cf490a5.tar.gz android_frameworks_base-2580a5ee55d73510767ad48ad5685d9b5cf490a5.tar.bz2 android_frameworks_base-2580a5ee55d73510767ad48ad5685d9b5cf490a5.zip |
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
-rw-r--r-- | services/java/com/android/server/power/Notifier.java | 4 |
1 files changed, 3 insertions, 1 deletions
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; } } |