kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix MediaRecorder crash when no data captured.
rodzic
8968ef1b85
commit
ae40a65924
|
@ -37,8 +37,17 @@ public class MediaRecorderWrapper implements Recorder {
|
|||
|
||||
@Override
|
||||
public void stop() {
|
||||
recorder.stop();
|
||||
recorder.release();
|
||||
recorder = null;
|
||||
try {
|
||||
recorder.stop();
|
||||
} catch (RuntimeException e) {
|
||||
if (e.getClass() != RuntimeException.class) {
|
||||
throw e;
|
||||
} else {
|
||||
Log.d(TAG, "Recording stopped with no data captured.");
|
||||
}
|
||||
} finally {
|
||||
recorder.release();
|
||||
recorder = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public final class FeatureFlags {
|
|||
private static final String DONOR_BADGES = "android.donorBadges.6";
|
||||
private static final String DONOR_BADGES_DISPLAY = "android.donorBadges.display.4";
|
||||
private static final String CDSH = "android.cdsh";
|
||||
private static final String VOICE_NOTE_RECORDING_V2 = "android.voiceNoteRecordingV2";
|
||||
private static final String VOICE_NOTE_RECORDING_V2 = "android.voiceNoteRecordingV2.2";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
|
@ -432,7 +432,7 @@ public final class FeatureFlags {
|
|||
|
||||
/** Whether or not to use the new voice note recorder backed by MediaRecorder. */
|
||||
public static boolean voiceNoteRecordingV2() {
|
||||
return getBoolean(VOICE_NOTE_RECORDING_V2, true);
|
||||
return getBoolean(VOICE_NOTE_RECORDING_V2, false);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
|
|
Ładowanie…
Reference in New Issue