mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Streamable Video.
This commit is contained in:
committed by
Nicholas Tinsley
parent
099c94c215
commit
64babe2e42
@@ -113,6 +113,7 @@ public final class FeatureFlags {
|
||||
private static final String PROMPT_FOR_NOTIFICATION_CONFIG = "android.logs.promptNotificationsConfig";
|
||||
public static final String PROMPT_BATTERY_SAVER = "android.promptBatterySaver";
|
||||
public static final String USERNAMES = "android.usernames";
|
||||
public static final String INSTANT_VIDEO_PLAYBACK = "android.instantVideoPlayback";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -177,7 +178,8 @@ public final class FeatureFlags {
|
||||
PROMPT_FOR_NOTIFICATION_LOGS,
|
||||
PROMPT_FOR_NOTIFICATION_CONFIG,
|
||||
PROMPT_BATTERY_SAVER,
|
||||
USERNAMES
|
||||
USERNAMES,
|
||||
INSTANT_VIDEO_PLAYBACK
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -629,6 +631,14 @@ public final class FeatureFlags {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow the video players to read from the temporary download files for attachments.
|
||||
* @return whether this functionality is enabled.
|
||||
*/
|
||||
public static boolean instantVideoPlayback() {
|
||||
return getBoolean(INSTANT_VIDEO_PLAYBACK, false);
|
||||
}
|
||||
|
||||
public static String promptForDelayedNotificationLogs() {
|
||||
return getString(PROMPT_FOR_NOTIFICATION_LOGS, "*");
|
||||
}
|
||||
@@ -641,6 +651,7 @@ public final class FeatureFlags {
|
||||
return getString(PROMPT_BATTERY_SAVER, "*");
|
||||
}
|
||||
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
@@ -446,7 +446,7 @@ public class MediaUtil {
|
||||
{
|
||||
try {
|
||||
AttachmentId attachmentId = PartAuthority.requireAttachmentId(uri);
|
||||
MediaDataSource source = SignalDatabase.attachments().mediaDataSourceFor(attachmentId);
|
||||
MediaDataSource source = SignalDatabase.attachments().mediaDataSourceFor(attachmentId, false);
|
||||
return extractFrame(source, timeUs);
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, "Failed to extract frame for URI: " + uri, e);
|
||||
|
||||
Reference in New Issue
Block a user