summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-16 05:46:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-16 05:46:09 -0700
commit0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6 (patch)
tree778ac62a2e224988455550a6a05f407915f7c7fb
parent7f148d65051e577cc4a002183ec55d625b51de85 (diff)
parentd1f362fe144e6cbcb759fa9086a80adbfe9c7589 (diff)
downloadframeworks_base-0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6.zip
frameworks_base-0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6.tar.gz
frameworks_base-0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6.tar.bz2
Merge change 4324 into donut
* changes: AudioService: Fix routing problem recently introduced in setRouting().
-rw-r--r--media/java/android/media/AudioService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index da15adf..937baad 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -668,7 +668,7 @@ public class AudioService extends IAudioService.Stub {
mSpeakerIsOn = true;
mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_SPEAKER;
incallMask = AudioSystem.ROUTE_ALL;
- } else if (mSpeakerIsOn) {
+ } else if (routes == 0 && mSpeakerIsOn) {
mSpeakerIsOn = false;
if (mBluetoothScoIsConnected) {
mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_BLUETOOTH_SCO;
@@ -695,7 +695,7 @@ public class AudioService extends IAudioService.Stub {
// should not affect A2DP routing
ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;
normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;
- } else if (mBluetoothScoIsConnected) {
+ } else if (routes == 0 && mBluetoothScoIsConnected) {
mBluetoothScoIsConnected = false;
if (mHeadsetIsConnected) {
mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_HEADSET;
@@ -739,7 +739,7 @@ public class AudioService extends IAudioService.Stub {
ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;
normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;
}
- } else if (mHeadsetIsConnected) {
+ } else if (routes == 0 && mHeadsetIsConnected) {
mHeadsetIsConnected = false;
// do not act upon headset disconnection if bluetooth SCO is connected to match phone app behavior
if (!mBluetoothScoIsConnected) {
@@ -772,7 +772,7 @@ public class AudioService extends IAudioService.Stub {
// so there is no need to disable other routes.
ringtoneMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;
normalMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;
- } else if (mBluetoothA2dpIsConnected) {
+ } else if (routes == 0 && mBluetoothA2dpIsConnected) {
mBluetoothA2dpIsConnected = false;
mRoutes[AudioSystem.MODE_RINGTONE] &= ~AudioSystem.ROUTE_BLUETOOTH_A2DP;
mRoutes[AudioSystem.MODE_NORMAL] &= ~AudioSystem.ROUTE_BLUETOOTH_A2DP;