[FONT="Courier New"]--- packages/apps/VoiceDialer/src/com/android/voicedialer/BluetoothVoiceDialerActivity.java.old 2011-11-04 13:21:10.131444353 -0400
+++ packages/apps/VoiceDialer/src/com/android/voicedialer/BluetoothVoiceDialerActivity.java 2012-05-18 20:27:04.521733235 -0400
@@ -167,7 +167,6 @@
private boolean mWaitingForScoConnection;
private Intent[] mAvailableChoices;
private Intent mChosenAction;
- private int mBluetoothVoiceVolume;
private int mState;
private AlertDialog mAlertDialog;
private Runnable mFallbackRunnable;
@@ -316,17 +315,6 @@
mWaitingForTts = false;
mTts.setOnUtteranceCompletedListener(new OnUtteranceCompletedListener());
- // TTS over bluetooth will distort if set too loud, so we will
- // store the current volume away, and then turn it down.
- // We will restore it in onStop.
- // Limit volume to roughly 75% of the max volume level for STREAM_BLUETOOTH_SCO
- mBluetoothVoiceVolume = mAudioManager.getStreamVolume(
- AudioManager.STREAM_BLUETOOTH_SCO);
- int maxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_BLUETOOTH_SCO);
- int volume = (int) (maxVolume / 1.3);
- if (mBluetoothVoiceVolume > volume) {
- mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, volume, 0);
- }
if (mWaitingForScoConnection) {
// the bluetooth connection is not up yet, still waiting.
@@ -879,9 +867,6 @@
mAlertDialog.dismiss();
}
- // set the volume back to the level it was before we started.
- mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO,
- mBluetoothVoiceVolume, 0);
mAudioManager.abandonAudioFocus(null);
// shut down bluetooth, if it exists[/FONT]