mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 22:59:25 +00:00
So long redphone
// FREEBIE
This commit is contained in:
@@ -12,10 +12,6 @@ import android.util.Log;
|
||||
|
||||
import com.google.android.gms.gcm.GoogleCloudMessaging;
|
||||
|
||||
import org.thoughtcrime.redphone.signaling.RedPhoneAccountAttributes;
|
||||
import org.thoughtcrime.redphone.signaling.RedPhoneAccountManager;
|
||||
import org.thoughtcrime.redphone.signaling.RedPhoneTrustStore;
|
||||
import org.thoughtcrime.securesms.BuildConfig;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil;
|
||||
import org.thoughtcrime.securesms.crypto.PreKeyUtil;
|
||||
@@ -267,15 +263,6 @@ public class RegistrationService extends Service {
|
||||
DatabaseFactory.getIdentityDatabase(this).saveIdentity(self.getRecipientId(), identityKey.getPublicKey());
|
||||
DirectoryHelper.refreshDirectory(this, accountManager, number);
|
||||
|
||||
if (supportsGcm) {
|
||||
RedPhoneAccountManager redPhoneAccountManager = new RedPhoneAccountManager(BuildConfig.REDPHONE_MASTER_URL,
|
||||
new RedPhoneTrustStore(this),
|
||||
number, password);
|
||||
|
||||
String verificationToken = accountManager.getAccountVerificationToken();
|
||||
redPhoneAccountManager.createAccount(verificationToken, new RedPhoneAccountAttributes(signalingKey, TextSecurePreferences.getGcmRegistrationId(this)));
|
||||
}
|
||||
|
||||
DirectoryRefreshListener.schedule(this);
|
||||
RotateSignedPreKeyListener.schedule(this);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,6 @@ import android.util.Pair;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.thoughtcrime.redphone.RedPhoneService;
|
||||
import org.thoughtcrime.redphone.call.LockManager;
|
||||
import org.thoughtcrime.redphone.pstn.IncomingPstnCallReceiver;
|
||||
import org.thoughtcrime.redphone.util.UncaughtExceptionHandlerManager;
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
import org.thoughtcrime.securesms.WebRtcCallActivity;
|
||||
import org.thoughtcrime.securesms.contacts.ContactAccessor;
|
||||
@@ -45,9 +41,11 @@ import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.webrtc.CallNotificationBuilder;
|
||||
import org.thoughtcrime.securesms.webrtc.IncomingPstnCallReceiver;
|
||||
import org.thoughtcrime.securesms.webrtc.PeerConnectionFactoryOptions;
|
||||
import org.thoughtcrime.securesms.webrtc.PeerConnectionWrapper;
|
||||
import org.thoughtcrime.securesms.webrtc.PeerConnectionWrapper.PeerConnectionException;
|
||||
import org.thoughtcrime.securesms.webrtc.UncaughtExceptionHandlerManager;
|
||||
import org.thoughtcrime.securesms.webrtc.WebRtcDataProtos;
|
||||
import org.thoughtcrime.securesms.webrtc.WebRtcDataProtos.Connected;
|
||||
import org.thoughtcrime.securesms.webrtc.WebRtcDataProtos.Data;
|
||||
@@ -55,6 +53,7 @@ import org.thoughtcrime.securesms.webrtc.WebRtcDataProtos.Hangup;
|
||||
import org.thoughtcrime.securesms.webrtc.audio.BluetoothStateManager;
|
||||
import org.thoughtcrime.securesms.webrtc.audio.OutgoingRinger;
|
||||
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager;
|
||||
import org.thoughtcrime.securesms.webrtc.locks.LockManager;
|
||||
import org.webrtc.AudioTrack;
|
||||
import org.webrtc.DataChannel;
|
||||
import org.webrtc.EglBase;
|
||||
@@ -814,9 +813,7 @@ public class WebRtcCallService extends Service implements InjectableType, PeerCo
|
||||
private boolean isBusy() {
|
||||
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
|
||||
|
||||
return callState != CallState.STATE_IDLE ||
|
||||
telephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE ||
|
||||
RedPhoneService.isCallActive(this);
|
||||
return callState != CallState.STATE_IDLE || telephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE;
|
||||
}
|
||||
|
||||
private boolean isIdle() {
|
||||
|
||||
Reference in New Issue
Block a user