From 83900754f357616b9e56eaf7fc85f49b8906e987 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 15 May 2014 15:14:22 -0700 Subject: [PATCH] AudioManager: add startBluetoothScoVirtualCall() Add API to start bluetooth SCO audio connection explicitly in virtual call mode. Bug: 11824396. Change-Id: I1dfab13c659f5855e0b78467ac48b3186af7874c --- api/current.txt | 1 + media/java/android/media/AudioManager.java | 39 +++++++++++++++++---- media/java/android/media/AudioService.java | 26 +++++++++----- media/java/android/media/IAudioService.aidl | 1 + 4 files changed, 52 insertions(+), 15 deletions(-) diff --git a/api/current.txt b/api/current.txt index ddde2f714eb57..6387eb7d34848 100644 --- a/api/current.txt +++ b/api/current.txt @@ -13798,6 +13798,7 @@ package android.media { method public deprecated void setWiredHeadsetOn(boolean); method public deprecated boolean shouldVibrate(int); method public void startBluetoothSco(); + method public void startBluetoothScoVirtualCall(); method public void stopBluetoothSco(); method public void unloadSoundEffects(); method public void unregisterMediaButtonEventReceiver(android.content.ComponentName); diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index d35225ab66e2b..47b6024c113ef 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -1254,11 +1254,6 @@ public class AudioManager { * call {@link #stopBluetoothSco()} to clear the request and turn down the bluetooth connection. *

Even if a SCO connection is established, the following restrictions apply on audio * output streams so that they can be routed to SCO headset: - *

NOTE: up to and including API version - * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}, this method initiates a virtual - * voice call to the bluetooth headset. - * After API version {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} only a raw SCO audio - * connection is established. *