diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-30 18:38:55 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-30 18:38:55 -0400 |
commit | 78128d721cdff2e035eab5da72819520f88affaf (patch) | |
tree | bf5f786fdf64c1d04825bb9265031a6a95537731 /core/java/android/server | |
parent | 094e3e0bcc81a795f35ac2ea218d0fc0109100cf (diff) | |
parent | 62895a67d2c34fc2a4b8943e330c4269275b1c20 (diff) | |
download | frameworks_base-78128d721cdff2e035eab5da72819520f88affaf.zip frameworks_base-78128d721cdff2e035eab5da72819520f88affaf.tar.gz frameworks_base-78128d721cdff2e035eab5da72819520f88affaf.tar.bz2 |
Merge change I2782ac8c into eclair
* changes:
Fix regression.
Diffstat (limited to 'core/java/android/server')
-rw-r--r-- | core/java/android/server/BluetoothA2dpService.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index 4a5f431..f871533 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java @@ -333,10 +333,11 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { return false; } String path = mBluetoothService.getObjectPathFromAddress(device.getAddress()); - if (path == null) { + Integer state = mAudioDevices.get(device); + if (path == null || state == null) { return false; } - switch (mAudioDevices.get(device)) { + switch (state.intValue()) { case BluetoothA2dp.STATE_CONNECTED: return true; case BluetoothA2dp.STATE_PLAYING: @@ -354,10 +355,11 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { return false; } String path = mBluetoothService.getObjectPathFromAddress(device.getAddress()); - if (path == null) { + Integer state = mAudioDevices.get(device); + if (path == null || state == null) { return false; } - switch (mAudioDevices.get(device)) { + switch (state.intValue()) { case BluetoothA2dp.STATE_PLAYING: return true; case BluetoothA2dp.STATE_CONNECTED: |