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

Commit ec2c88d8 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Move new sound effects to the system stream.

Change-Id: I11cfa6495abeb0193b1a3929ec54f0386cfe9ed2
parent 9a56aaf1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Binder;
import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
@@ -379,7 +380,10 @@ class DockObserver extends UEventObserver {
                                    final Uri soundUri = Uri.parse("file://" + soundPath);
                                    if (soundUri != null) {
                                        final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
                                        if (sfx != null) sfx.play();
                                        if (sfx != null) {
                                            sfx.setStreamType(AudioManager.STREAM_SYSTEM);
                                            sfx.play();
                                        }
                                    }
                                }
                            }
+4 −1
Original line number Diff line number Diff line
@@ -826,7 +826,10 @@ public class StatusBarPolicy {
                final Uri soundUri = Uri.parse("file://" + soundPath);
                if (soundUri != null) {
                    final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
                    if (sfx != null) sfx.play();
                    if (sfx != null) {
                        sfx.setStreamType(AudioManager.STREAM_SYSTEM);
                        sfx.play();
                    }
                }
            }
        }