diff options
| author | 2014-05-15 16:37:29 -0700 | |
|---|---|---|
| committer | 2014-06-20 17:49:06 +0000 | |
| commit | 1cff3844da64c3fc751ca0e047a6369d96c2c12e (patch) | |
| tree | ebe9d93d95fc1c4050c6b9cbcc1ff8b00ca217e5 | |
| parent | 0916423712f546b7a073dd71bcd012bae614d5df (diff) | |
update SCO audio test app
Added test for startBluetoothScoVirtualCall()
Change-Id: I1b47b60a8c5fb0158d4e224252a9d511c612ca2f
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 b769a0c6a092..acb77677793c 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" /> + <CheckBox + android:id="@+id/useVirtualCallCheckBox" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/useVirtualCallCheckText" /> </LinearLayout> diff --git a/media/tests/ScoAudioTest/res/values/strings.xml b/media/tests/ScoAudioTest/res/values/strings.xml index c3ff6d5b0fe5..b0284e26ac50 100644 --- a/media/tests/ScoAudioTest/res/values/strings.xml +++ b/media/tests/ScoAudioTest/res/values/strings.xml @@ -10,5 +10,5 @@ <string name="tts_speak">Speak TTS</string> <string name="tts_to_file">TTS to file</string> <string name="audiomanagertwo">Use different AudioManager for starting SCO</string> - + <string name="useVirtualCallCheckText">Use Virtual Call</string> </resources> diff --git a/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java b/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ScoAudioTest.java index 030464034516..7e21876accb2 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(); |