mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Use MediaRecorder for voice notes on capable devices.
Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
committed by
Greyson Parrelli
parent
e6451db888
commit
b04ae3a8b3
@@ -87,6 +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";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -127,7 +128,8 @@ public final class FeatureFlags {
|
||||
SENDER_KEY_MAX_AGE,
|
||||
DONOR_BADGES,
|
||||
DONOR_BADGES_DISPLAY,
|
||||
CHANGE_NUMBER_ENABLED
|
||||
CHANGE_NUMBER_ENABLED,
|
||||
VOICE_NOTE_RECORDING_V2
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -181,7 +183,8 @@ public final class FeatureFlags {
|
||||
CDSH,
|
||||
SENDER_KEY_MAX_AGE,
|
||||
DONOR_BADGES_DISPLAY,
|
||||
DONATE_MEGAPHONE
|
||||
DONATE_MEGAPHONE,
|
||||
VOICE_NOTE_RECORDING_V2
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -427,6 +430,11 @@ public final class FeatureFlags {
|
||||
return Environment.IS_STAGING && getBoolean(CDSH, false);
|
||||
}
|
||||
|
||||
/** Whether or not to use the new voice note recorder backed by MediaRecorder. */
|
||||
public static boolean voiceNoteRecordingV2() {
|
||||
return getBoolean(VOICE_NOTE_RECORDING_V2, true);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
Reference in New Issue
Block a user