update SCO audio test app

Added test for startBluetoothScoVirtualCall()

Change-Id: I1b47b60a8c5fb0158d4e224252a9d511c612ca2f
This commit is contained in:
Eric Laurent
2014-05-15 16:37:29 -07:00
parent 0916423712
commit 1cff3844da
3 changed files with 18 additions and 4 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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();