Move new sound effects to the system stream.

Change-Id: I11cfa6495abeb0193b1a3929ec54f0386cfe9ed2
This commit is contained in:
Daniel Sandler
2010-02-20 01:04:57 -05:00
parent 9a56aaf12b
commit ec2c88d835
2 changed files with 9 additions and 2 deletions

View File

@@ -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();
}
}
}
}