diff options
author | Daniel Sandler <dsandler@google.com> | 2010-02-20 01:04:57 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2010-02-22 15:10:38 -0500 |
commit | ec2c88d835dac156be0d14bd2b73cf3825e2e164 (patch) | |
tree | dd1a7805c6951214ebb60fde3a2f7c28d358cc5a | |
parent | 9a56aaf12b462a064e81e02386eca8a1e77fe737 (diff) | |
download | frameworks_base-ec2c88d835dac156be0d14bd2b73cf3825e2e164.zip frameworks_base-ec2c88d835dac156be0d14bd2b73cf3825e2e164.tar.gz frameworks_base-ec2c88d835dac156be0d14bd2b73cf3825e2e164.tar.bz2 |
Move new sound effects to the system stream.
Change-Id: I11cfa6495abeb0193b1a3929ec54f0386cfe9ed2
-rw-r--r-- | services/java/com/android/server/DockObserver.java | 6 | ||||
-rw-r--r-- | services/java/com/android/server/status/StatusBarPolicy.java | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/services/java/com/android/server/DockObserver.java b/services/java/com/android/server/DockObserver.java index 4791718..606b589 100644 --- a/services/java/com/android/server/DockObserver.java +++ b/services/java/com/android/server/DockObserver.java @@ -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(); + } } } } diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java index d13f9d3..f1ccb9b 100644 --- a/services/java/com/android/server/status/StatusBarPolicy.java +++ b/services/java/com/android/server/status/StatusBarPolicy.java @@ -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(); + } } } } |