mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Discard voice note recording on error.
This commit is contained in:
@@ -48,14 +48,14 @@ public class AudioRecorder {
|
||||
if (this.uiHandler != null) {
|
||||
onAudioFocusChangeListener = focusChange -> {
|
||||
if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
|
||||
Log.i(TAG, "Audio focus change " + focusChange + " stopping recording");
|
||||
Log.i(TAG, "Audio focus change " + focusChange + " stopping recording via UI handler.");
|
||||
this.uiHandler.onRecordCanceled(false);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
onAudioFocusChangeListener = focusChange -> {
|
||||
if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
|
||||
Log.i(TAG, "Audio focus change " + focusChange + " stopping recording");
|
||||
Log.i(TAG, "Audio focus change " + focusChange + " stopping recording.");
|
||||
stopRecording();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user