mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
We don't need to refresh attributes in redphone any longer
// FREEBIE
This commit is contained in:
parent
e1d0f2f4e9
commit
bb5e7db57e
@ -3,8 +3,6 @@ package org.thoughtcrime.securesms.jobs;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.redphone.signaling.RedPhoneAccountAttributes;
|
||||
import org.thoughtcrime.redphone.signaling.RedPhoneAccountManager;
|
||||
import org.thoughtcrime.securesms.dependencies.InjectableType;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.jobqueue.JobParameters;
|
||||
@ -23,7 +21,7 @@ public class RefreshAttributesJob extends ContextJob implements InjectableType {
|
||||
private static final String TAG = RefreshAttributesJob.class.getSimpleName();
|
||||
|
||||
@Inject transient SignalServiceAccountManager signalAccountManager;
|
||||
@Inject transient RedPhoneAccountManager redPhoneAccountManager;
|
||||
// @Inject transient RedPhoneAccountManager redPhoneAccountManager;
|
||||
|
||||
public RefreshAttributesJob(Context context) {
|
||||
super(context, JobParameters.newBuilder()
|
||||
@ -40,14 +38,14 @@ public class RefreshAttributesJob extends ContextJob implements InjectableType {
|
||||
@Override
|
||||
public void onRun() throws IOException {
|
||||
String signalingKey = TextSecurePreferences.getSignalingKey(context);
|
||||
String gcmRegistrationId = TextSecurePreferences.getGcmRegistrationId(context);
|
||||
// String gcmRegistrationId = TextSecurePreferences.getGcmRegistrationId(context);
|
||||
int registrationId = TextSecurePreferences.getLocalRegistrationId(context);
|
||||
boolean video = TextSecurePreferences.isWebrtcCallingEnabled(context);
|
||||
boolean fetchesMessages = TextSecurePreferences.isGcmDisabled(context);
|
||||
|
||||
String token = signalAccountManager.getAccountVerificationToken();
|
||||
// String token = signalAccountManager.getAccountVerificationToken();
|
||||
|
||||
redPhoneAccountManager.createAccount(token, new RedPhoneAccountAttributes(signalingKey, gcmRegistrationId));
|
||||
// redPhoneAccountManager.createAccount(token, new RedPhoneAccountAttributes(signalingKey, gcmRegistrationId));
|
||||
signalAccountManager.setAccountAttributes(signalingKey, registrationId, true, video || fetchesMessages, fetchesMessages);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user