Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd10b0da authored by Beverly's avatar Beverly Committed by android-build-merger
Browse files

Merge "All users will hear charging sounds." into pi-dev am: e5c9cc12

am: 9d169f13

Change-Id: I23839160ca22fd22dd87f10303faf5e7bda6fca5
parents 25972bef 9d169f13
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);