summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2014-10-29 22:51:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-29 22:51:38 +0000
commit34964701e0ff9c07e8d3456fe6d1246d6e8078d1 (patch)
tree77b5472eb0c447e330f531c57109fc8b1ac8feac /media
parentb2c607dbb876d2d32565e3183f472ea278a609ec (diff)
parentdb41880dd3259646b9ea43be6d8a91d4adb40122 (diff)
downloadframeworks_base-34964701e0ff9c07e8d3456fe6d1246d6e8078d1.zip
frameworks_base-34964701e0ff9c07e8d3456fe6d1246d6e8078d1.tar.gz
frameworks_base-34964701e0ff9c07e8d3456fe6d1246d6e8078d1.tar.bz2
am db41880d: Merge "Fix exception in AudioService when no BT Headset is connected." into lmp-mr1-dev
* commit 'db41880dd3259646b9ea43be6d8a91d4adb40122': Fix exception in AudioService when no BT Headset is connected.
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioService.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index a84fe44..6a69517 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -2574,13 +2574,17 @@ public class AudioService extends IAudioService.Stub {
if (mScoAudioState == SCO_STATE_INACTIVE) {
mScoAudioMode = scoAudioMode;
if (scoAudioMode == SCO_MODE_UNDEFINED) {
- mScoAudioMode = new Integer(Settings.Global.getInt(
- mContentResolver,
- "bluetooth_sco_channel_"+
- mBluetoothHeadsetDevice.getAddress(),
- SCO_MODE_VIRTUAL_CALL));
- if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
- mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+ if (mBluetoothHeadsetDevice != null) {
+ mScoAudioMode = new Integer(Settings.Global.getInt(
+ mContentResolver,
+ "bluetooth_sco_channel_"+
+ mBluetoothHeadsetDevice.getAddress(),
+ SCO_MODE_VIRTUAL_CALL));
+ if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
+ mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+ }
+ } else {
+ mScoAudioMode = SCO_MODE_RAW;
}
}
if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {