From 1cff3844da64c3fc751ca0e047a6369d96c2c12e Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 15 May 2014 16:37:29 -0700 Subject: [PATCH] update SCO audio test app Added test for startBluetoothScoVirtualCall() Change-Id: I1b47b60a8c5fb0158d4e224252a9d511c612ca2f --- .../ScoAudioTest/res/layout/scoaudiotest.xml | 5 +++++ media/tests/ScoAudioTest/res/values/strings.xml | 2 +- .../com/android/scoaudiotest/ScoAudioTest.java | 15 ++++++++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/media/tests/ScoAudioTest/res/layout/scoaudiotest.xml b/media/tests/ScoAudioTest/res/layout/scoaudiotest.xml index b769a0c6a092a..acb77677793c7 100644 --- a/media/tests/ScoAudioTest/res/layout/scoaudiotest.xml +++ b/media/tests/ScoAudioTest/res/layout/scoaudiotest.xml @@ -125,6 +125,11 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/audiomanagertwo" /> + diff --git a/media/tests/ScoAudioTest/res/values/strings.xml b/media/tests/ScoAudioTest/res/values/strings.xml index c3ff6d5b0fe5b..b0284e26ac501 100644 --- a/media/tests/ScoAudioTest/res/values/strings.xml +++ b/media/tests/ScoAudioTest/res/values/strings.xml @@ -10,5 +10,5 @@ Speak TTS TTS to file Use different AudioManager for starting SCO - + Use Virtual Call diff --git a/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java b/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java index 0304640345169..7e21876accb21 100644 --- a/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java +++ b/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java @@ -207,16 +207,25 @@ public class ScoAudioTest extends Activity { if (mForceScoOn != isChecked) { mForceScoOn = isChecked; AudioManager mngr = mAudioManager; + boolean useVirtualCall = false; CheckBox box = (CheckBox) findViewById(R.id.useSecondAudioManager); if (box.isChecked()) { Log.i(TAG, "Using 2nd audio manager"); mngr = mAudioManager2; } + box = (CheckBox) findViewById(R.id.useVirtualCallCheckBox); + useVirtualCall = box.isChecked(); if (mForceScoOn) { - Log.e(TAG, "startBluetoothSco() IN"); - mngr.startBluetoothSco(); - Log.e(TAG, "startBluetoothSco() OUT"); + if (useVirtualCall) { + Log.e(TAG, "startBluetoothScoVirtualCall() IN"); + mngr.startBluetoothScoVirtualCall(); + Log.e(TAG, "startBluetoothScoVirtualCall() OUT"); + } else { + Log.e(TAG, "startBluetoothSco() IN"); + mngr.startBluetoothSco(); + Log.e(TAG, "startBluetoothSco() OUT"); + } } else { Log.e(TAG, "stopBluetoothSco() IN"); mngr.stopBluetoothSco();