update SCO audio test app
Added test for startBluetoothScoVirtualCall() Change-Id: I1b47b60a8c5fb0158d4e224252a9d511c612ca2f
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user