We don't need to refresh attributes in redphone any longer

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-03-13 11:47:55 -07:00
parent e1d0f2f4e9
commit bb5e7db57e

View File

@ -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);
}