mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 15:31:46 +00:00
Support for Signal calls.
Merge in RedPhone // FREEBIE
This commit is contained in:
@@ -11,20 +11,16 @@ import org.thoughtcrime.securesms.database.GroupDatabase;
|
||||
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement;
|
||||
import org.thoughtcrime.securesms.mms.AttachmentStreamUriLoader.AttachmentModel;
|
||||
import org.thoughtcrime.securesms.push.TextSecurePushTrustStore;
|
||||
import org.thoughtcrime.securesms.util.BitmapDecodingException;
|
||||
import org.thoughtcrime.securesms.util.BitmapUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.jobqueue.JobParameters;
|
||||
import org.whispersystems.jobqueue.requirements.NetworkRequirement;
|
||||
import org.whispersystems.libaxolotl.InvalidMessageException;
|
||||
import org.whispersystems.textsecure.api.crypto.AttachmentCipherInputStream;
|
||||
import org.whispersystems.textsecure.api.push.exceptions.NonSuccessfulResponseCodeException;
|
||||
import org.whispersystems.textsecure.internal.push.PushServiceSocket;
|
||||
import org.whispersystems.textsecure.internal.util.StaticCredentialsProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
public class AvatarDownloadJob extends MasterSecretJob {
|
||||
@@ -85,11 +81,12 @@ public class AvatarDownloadJob extends MasterSecretJob {
|
||||
}
|
||||
|
||||
private File downloadAttachment(String relay, long contentLocation) throws IOException {
|
||||
PushServiceSocket socket = new PushServiceSocket(BuildConfig.PUSH_URL,
|
||||
PushServiceSocket socket = new PushServiceSocket(BuildConfig.TEXTSECURE_URL,
|
||||
new TextSecurePushTrustStore(context),
|
||||
new StaticCredentialsProvider(TextSecurePreferences.getLocalNumber(context),
|
||||
TextSecurePreferences.getPushServerPassword(context),
|
||||
null));
|
||||
null),
|
||||
BuildConfig.USER_AGENT);
|
||||
|
||||
File destination = File.createTempFile("avatar", "tmp");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user