2017-03-28 19:05:30 +00:00
|
|
|
package org.thoughtcrime.securesms.mms;
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.support.annotation.NonNull;
|
|
|
|
import android.support.annotation.Nullable;
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.attachments.Attachment;
|
2018-02-16 19:13:20 +00:00
|
|
|
import org.thoughtcrime.securesms.util.StorageUtil;
|
2017-03-28 19:05:30 +00:00
|
|
|
|
|
|
|
public class DocumentSlide extends Slide {
|
|
|
|
|
|
|
|
public DocumentSlide(@NonNull Context context, @NonNull Attachment attachment) {
|
|
|
|
super(context, attachment);
|
|
|
|
}
|
|
|
|
|
|
|
|
public DocumentSlide(@NonNull Context context, @NonNull Uri uri,
|
|
|
|
@NonNull String contentType, long size,
|
|
|
|
@Nullable String fileName)
|
|
|
|
{
|
2018-02-07 22:01:37 +00:00
|
|
|
super(context, constructAttachmentFromUri(context, uri, contentType, size, 0, 0, true, StorageUtil.getCleanFileName(fileName), false, false));
|
2017-03-28 19:05:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean hasDocument() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|