Merge "All users will hear charging sounds." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e5c9cc124a
@@ -718,14 +718,13 @@ final class Notifier {
|
|||||||
* Plays the wireless charging sound for both wireless and non-wireless charging
|
* Plays the wireless charging sound for both wireless and non-wireless charging
|
||||||
*/
|
*/
|
||||||
private void playChargingStartedSound() {
|
private void playChargingStartedSound() {
|
||||||
final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(),
|
// TODO (b/77912907): add back charging sound enabled check & default to charging sounds ON
|
||||||
Settings.Global.CHARGING_SOUNDS_ENABLED, 1) != 0;
|
|
||||||
final boolean dndOff = Settings.Global.getInt(mContext.getContentResolver(),
|
final boolean dndOff = Settings.Global.getInt(mContext.getContentResolver(),
|
||||||
Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS)
|
Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS)
|
||||||
== Settings.Global.ZEN_MODE_OFF;
|
== Settings.Global.ZEN_MODE_OFF;
|
||||||
final String soundPath = Settings.Global.getString(mContext.getContentResolver(),
|
final String soundPath = Settings.Global.getString(mContext.getContentResolver(),
|
||||||
Settings.Global.CHARGING_STARTED_SOUND);
|
Settings.Global.CHARGING_STARTED_SOUND);
|
||||||
if (enabled && dndOff && soundPath != null) {
|
if (dndOff && soundPath != null) {
|
||||||
final Uri soundUri = Uri.parse("file://" + soundPath);
|
final Uri soundUri = Uri.parse("file://" + soundPath);
|
||||||
if (soundUri != null) {
|
if (soundUri != null) {
|
||||||
final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
|
final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
|
||||||
|
|||||||
Reference in New Issue
Block a user