mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 05:28:27 +00:00
WIP make things compile
This commit is contained in:
parent
8e8abcbe81
commit
fcb71961d6
@ -10,6 +10,8 @@ import org.thoughtcrime.securesms.mms.PartAuthority;
|
|||||||
import org.thoughtcrime.securesms.util.Hex;
|
import org.thoughtcrime.securesms.util.Hex;
|
||||||
import org.thoughtcrime.securesms.util.Util;
|
import org.thoughtcrime.securesms.util.Util;
|
||||||
|
|
||||||
|
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
|
||||||
|
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
@ -33,7 +33,7 @@ import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
|||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.session.libsession.messaging.sending_receiving.attachments.AttachmentServer;
|
import org.thoughtcrime.securesms.attachments.AttachmentServer;
|
||||||
import org.thoughtcrime.securesms.logging.Log;
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
import org.thoughtcrime.securesms.mms.AudioSlide;
|
import org.thoughtcrime.securesms.mms.AudioSlide;
|
||||||
import org.thoughtcrime.securesms.util.ServiceUtil;
|
import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||||
|
@ -10,7 +10,6 @@ import android.text.TextUtils;
|
|||||||
import androidx.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
|
||||||
|
|
||||||
import com.amulyakhare.textdrawable.TextDrawable;
|
import com.amulyakhare.textdrawable.TextDrawable;
|
||||||
|
|
||||||
@ -82,10 +81,4 @@ public class GeneratedContactPhoto implements FallbackContactPhoto {
|
|||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Drawable asCallCard(Context context) {
|
|
||||||
return AppCompatResources.getDrawable(context, R.drawable.ic_person_large);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -53,11 +53,6 @@ public class ResourceContactPhoto implements FallbackContactPhoto {
|
|||||||
return new ExpandingLayerDrawable(new Drawable[] {background, foreground, gradient});
|
return new ExpandingLayerDrawable(new Drawable[] {background, foreground, gradient});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Drawable asCallCard(Context context) {
|
|
||||||
return AppCompatResources.getDrawable(context, callCardResourceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ExpandingLayerDrawable extends LayerDrawable {
|
private static class ExpandingLayerDrawable extends LayerDrawable {
|
||||||
public ExpandingLayerDrawable(Drawable[] layers) {
|
public ExpandingLayerDrawable(Drawable[] layers) {
|
||||||
super(layers);
|
super(layers);
|
||||||
|
@ -33,7 +33,7 @@ class MessageSendJob(val message: Message, val destination: Destination) : Job {
|
|||||||
if(MessagingConfiguration.shared.storage.getAttachmentUploadJob(it.attachmentId) != null) {
|
if(MessagingConfiguration.shared.storage.getAttachmentUploadJob(it.attachmentId) != null) {
|
||||||
// Wait for it to finish
|
// Wait for it to finish
|
||||||
} else {
|
} else {
|
||||||
val job = AttachmentUploadJob(it.attachmentId, message.threadID!!, message, id!!)
|
val job = AttachmentUploadJob(it.attachmentId, message.threadID!!.toString(), message, id!!)
|
||||||
JobQueue.shared.add(job)
|
JobQueue.shared.add(job)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,8 @@ public final class RecipientExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void addAddressToIntent(Intent intent, Address address) {
|
private static void addAddressToIntent(Intent intent, Address address) {
|
||||||
if (address.isPhone()) {
|
if (address.isContact()) {
|
||||||
intent.putExtra(ContactsContract.Intents.Insert.PHONE, address.toPhoneString());
|
intent.putExtra(ContactsContract.Intents.Insert.PHONE, address.toString());
|
||||||
} else if (address.isEmail()) {
|
|
||||||
intent.putExtra(ContactsContract.Intents.Insert.EMAIL, address.toEmailString());
|
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Cannot export Recipient with neither phone nor email");
|
throw new RuntimeException("Cannot export Recipient with neither phone nor email");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user