diff options
author | John Spurlock <jspurlock@google.com> | 2015-05-06 22:49:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-06 22:49:05 +0000 |
commit | c2ec334079375ac6a4337bd5b94e173534b51129 (patch) | |
tree | 62ac7d32661dd5af0b3ce1d89ca6acc6f328c182 /services/core | |
parent | 9a7db1a6f58a3efc37c7e761445617f22adb9d4e (diff) | |
parent | 51a871d48a9f4d912b2c12c29bbddcc5ec175825 (diff) | |
download | frameworks_base-c2ec334079375ac6a4337bd5b94e173534b51129.zip frameworks_base-c2ec334079375ac6a4337bd5b94e173534b51129.tar.gz frameworks_base-c2ec334079375ac6a4337bd5b94e173534b51129.tar.bz2 |
Merge "Add setting to mute wireless charging sound." into mnc-dev
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/power/Notifier.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java index c48367e..fd98010 100644 --- a/services/core/java/com/android/server/power/Notifier.java +++ b/services/core/java/com/android/server/power/Notifier.java @@ -539,9 +539,11 @@ final class Notifier { }; private void playWirelessChargingStartedSound() { + final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.CHARGING_SOUNDS_ENABLED, 1) != 0; final String soundPath = Settings.Global.getString(mContext.getContentResolver(), Settings.Global.WIRELESS_CHARGING_STARTED_SOUND); - if (soundPath != null) { + if (enabled && soundPath != null) { final Uri soundUri = Uri.parse("file://" + soundPath); if (soundUri != null) { final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri); |