summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/soundrecorder/SoundRecorder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/soundrecorder/SoundRecorder.java b/src/com/android/soundrecorder/SoundRecorder.java
index 3913ac0..9262fa4 100644
--- a/src/com/android/soundrecorder/SoundRecorder.java
+++ b/src/com/android/soundrecorder/SoundRecorder.java
@@ -284,6 +284,7 @@ public class SoundRecorder extends Activity
if ((sOldCallState == TelephonyManager.CALL_STATE_OFFHOOK)
&& !(mAudioSourceType == MediaRecorder.AudioSource.MIC)){
mRecorder.stop();
+ sOldCallState = TelephonyManager.CALL_STATE_IDLE;
mAudioSourceType = MediaRecorder.AudioSource.MIC;
}
break;
@@ -493,7 +494,7 @@ public class SoundRecorder extends Activity
} else {
stopAudioPlayback();
- if ((mAudioManager.getMode() == AudioManager.MODE_IN_CALL) &&
+ if ((sOldCallState == TelephonyManager.CALL_STATE_OFFHOOK) &&
(mAudioSourceType == MediaRecorder.AudioSource.MIC)) {
mAudioSourceType = MediaRecorder.AudioSource.VOICE_UPLINK;
Log.e(TAG, "Selected Voice Tx only Source: sourcetype" + mAudioSourceType);