mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 07:27:26 +00:00
Remove AttachmentsV3 feature flag.
This commit is contained in:
@@ -138,8 +138,7 @@ public class ApplicationDependencies {
|
||||
messageSender.update(
|
||||
IncomingMessageObserver.getPipe(),
|
||||
IncomingMessageObserver.getUnidentifiedPipe(),
|
||||
TextSecurePreferences.isMultiDevice(application),
|
||||
FeatureFlags.attachmentsV3());
|
||||
TextSecurePreferences.isMultiDevice(application));
|
||||
}
|
||||
|
||||
return messageSender;
|
||||
|
@@ -95,7 +95,6 @@ public class ApplicationDependencyProvider implements ApplicationDependencies.Pr
|
||||
new SignalProtocolStoreImpl(context),
|
||||
BuildConfig.SIGNAL_AGENT,
|
||||
TextSecurePreferences.isMultiDevice(context),
|
||||
FeatureFlags.attachmentsV3(),
|
||||
Optional.fromNullable(IncomingMessageObserver.getPipe()),
|
||||
Optional.fromNullable(IncomingMessageObserver.getUnidentifiedPipe()),
|
||||
Optional.of(new SecurityEventListener(context)),
|
||||
|
@@ -261,14 +261,11 @@ public class MultiDeviceContactUpdateJob extends BaseJob {
|
||||
{
|
||||
if (length > 0) {
|
||||
try {
|
||||
SignalServiceAttachmentStream.Builder attachmentStream = SignalServiceAttachment.newStreamBuilder()
|
||||
.withStream(stream)
|
||||
.withContentType("application/octet-stream")
|
||||
.withLength(length);
|
||||
|
||||
if (FeatureFlags.attachmentsV3()) {
|
||||
attachmentStream.withResumableUploadSpec(messageSender.getResumableUploadSpec());
|
||||
}
|
||||
SignalServiceAttachmentStream.Builder attachmentStream = SignalServiceAttachment.newStreamBuilder()
|
||||
.withStream(stream)
|
||||
.withContentType("application/octet-stream")
|
||||
.withLength(length)
|
||||
.withResumableUploadSpec(messageSender.getResumableUploadSpec());
|
||||
|
||||
messageSender.sendMessage(SignalServiceSyncMessage.forContacts(new ContactsMessage(attachmentStream.build(), complete)),
|
||||
UnidentifiedAccessUtil.getAccessForSync(context));
|
||||
|
@@ -255,11 +255,8 @@ public abstract class PushSendJob extends SendJob {
|
||||
.withWidth(thumbnailData.getWidth())
|
||||
.withHeight(thumbnailData.getHeight())
|
||||
.withLength(thumbnailData.getBitmap().length)
|
||||
.withStream(new ByteArrayInputStream(thumbnailData.getBitmap()));
|
||||
|
||||
if (FeatureFlags.attachmentsV3()) {
|
||||
builder.withResumableUploadSpec(ApplicationDependencies.getSignalServiceMessageSender().getResumableUploadSpec());
|
||||
}
|
||||
.withStream(new ByteArrayInputStream(thumbnailData.getBitmap()))
|
||||
.withResumableUploadSpec(ApplicationDependencies.getSignalServiceMessageSender().getResumableUploadSpec());
|
||||
|
||||
thumbnail = builder.build();
|
||||
}
|
||||
|
@@ -35,11 +35,6 @@ public class ResumableUploadSpecJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
protected void onRun() throws Exception {
|
||||
if (!FeatureFlags.attachmentsV3()) {
|
||||
Log.i(TAG, "Attachments V3 is not enabled so there is nothing to do!");
|
||||
return;
|
||||
}
|
||||
|
||||
ResumableUploadSpec resumableUploadSpec = ApplicationDependencies.getSignalServiceMessageSender()
|
||||
.getResumableUploadSpec();
|
||||
|
||||
|
@@ -50,7 +50,6 @@ public final class FeatureFlags {
|
||||
private static final long FETCH_INTERVAL = TimeUnit.HOURS.toMillis(2);
|
||||
|
||||
private static final String USERNAMES = "android.usernames";
|
||||
private static final String ATTACHMENTS_V3 = "android.attachmentsV3.2";
|
||||
private static final String REMOTE_DELETE = "android.remoteDelete";
|
||||
private static final String GROUPS_V2_OLD_1 = "android.groupsv2";
|
||||
private static final String GROUPS_V2_OLD_2 = "android.groupsv2.2";
|
||||
@@ -73,7 +72,6 @@ public final class FeatureFlags {
|
||||
*/
|
||||
|
||||
private static final Set<String> REMOTE_CAPABLE = Sets.newHashSet(
|
||||
ATTACHMENTS_V3,
|
||||
REMOTE_DELETE,
|
||||
GROUPS_V2,
|
||||
GROUPS_V2_CREATE_VERSION,
|
||||
@@ -106,7 +104,6 @@ public final class FeatureFlags {
|
||||
* more burden on the reader to ensure that the app experience remains consistent.
|
||||
*/
|
||||
private static final Set<String> HOT_SWAPPABLE = Sets.newHashSet(
|
||||
ATTACHMENTS_V3,
|
||||
GROUPS_V2_CREATE_VERSION,
|
||||
GROUPS_V2_JOIN_VERSION,
|
||||
VERIFY_V2,
|
||||
@@ -196,11 +193,6 @@ public final class FeatureFlags {
|
||||
return getBoolean(USERNAMES, false);
|
||||
}
|
||||
|
||||
/** Whether or not we use the attachments v3 form. */
|
||||
public static boolean attachmentsV3() {
|
||||
return getBoolean(ATTACHMENTS_V3, false);
|
||||
}
|
||||
|
||||
/** Send support for remotely deleting a message. */
|
||||
public static boolean remoteDelete() {
|
||||
return getBoolean(REMOTE_DELETE, false);
|
||||
|
Reference in New Issue
Block a user