mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-06 20:31:56 +00:00
Manually encode voice messages to AAC with ADTS headers
Should resolve issues with platforms that don't support AMR (!). Fixes #4640 Fixes #4652 Fixes #4647 // FREEBIE
This commit is contained in:
@@ -25,6 +25,8 @@ import android.support.annotation.Nullable;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.attachments.Attachment;
|
||||
import org.thoughtcrime.securesms.attachments.UriAttachment;
|
||||
import org.thoughtcrime.securesms.database.AttachmentDatabase;
|
||||
import org.thoughtcrime.securesms.util.ResUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -38,6 +40,10 @@ public class AudioSlide extends Slide {
|
||||
super(context, constructAttachmentFromUri(context, uri, ContentType.AUDIO_UNSPECIFIED, dataSize));
|
||||
}
|
||||
|
||||
public AudioSlide(Context context, Uri uri, long dataSize, String contentType) {
|
||||
super(context, new UriAttachment(uri, contentType, AttachmentDatabase.TRANSFER_PROGRESS_STARTED, dataSize));
|
||||
}
|
||||
|
||||
public AudioSlide(Context context, Attachment attachment) {
|
||||
super(context, attachment);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user