Update to ringrtc v2.1.0

master
Jim Gustafson 2020-06-11 19:14:04 -07:00 committed by Greyson Parrelli
parent 5b2a399392
commit 2ecdf803c0
3 changed files with 15 additions and 9 deletions

View File

@ -304,7 +304,7 @@ dependencies {
implementation 'org.signal:argon2:13.1@aar'
implementation 'org.signal:ringrtc-android:2.0.3'
implementation 'org.signal:ringrtc-android:2.1.0'
implementation "me.leolin:ShortcutBadger:1.1.16"
implementation 'se.emilsjolander:stickylistheaders:2.7.0'

View File

@ -74,6 +74,7 @@ import org.whispersystems.signalservice.api.push.exceptions.UnregisteredUserExce
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
@ -412,8 +413,15 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
CallManager.CallMediaType callType = getCallMediaTypeFromOfferType(offerType);
long timeMilli = new Date().getTime();
long messageAgeSec = 0L;
if (timeMilli > timeStamp) {
messageAgeSec = (timeMilli - timeStamp) / 1000;
}
Log.i(TAG, "handleReceivedOffer(): messageAgeSec: " + messageAgeSec);
try {
callManager.receivedOffer(callId, remotePeer, remoteDevice, offer, timeStamp, callType, isMultiRing, true);
callManager.receivedOffer(callId, remotePeer, remoteDevice, offer, messageAgeSec, callType, 1, isMultiRing, true);
} catch (CallException e) {
callFailure("Unable to process received offer: ", e);
}
@ -435,7 +443,7 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
CallManager.CallMediaType callMediaType = getCallMediaTypeFromOfferType(offerType);
try {
callManager.call(remotePeer, callMediaType);
callManager.call(remotePeer, callMediaType, 1);
} catch (CallException e) {
callFailure("Unable to create outgoing call: ", e);
}
@ -611,7 +619,6 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
camera,
iceServers,
isAlwaysTurn,
1,
deviceList,
enableVideoOnCreate,
true);
@ -656,7 +663,6 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
camera,
iceServers,
hideIp,
1,
deviceList,
false,
true);
@ -1650,8 +1656,8 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
// CallManager observer callbacks
@Override
public void onStartCall(Remote remote, CallId callId, Boolean isOutgoing) {
Log.i(TAG, "onStartCall: callId: " + callId + ", outgoing: " + isOutgoing);
public void onStartCall(Remote remote, CallId callId, Boolean isOutgoing, CallManager.CallMediaType callMediaType) {
Log.i(TAG, "onStartCall: callId: " + callId + ", outgoing: " + isOutgoing + ", type: " + callMediaType);
if (activePeer != null) {
throw new IllegalStateException("activePeer already set for START_OUTGOING_CALL");

View File

@ -432,8 +432,8 @@ dependencyVerification {
['org.signal:argon2:13.1',
'0f686ccff0d4842bfcc74d92e8dc780a5f159b9376e37a1189fabbcdac458bef'],
['org.signal:ringrtc-android:2.0.3',
'1469e370fcf8ec19754017c9ee9493db2a3e952adbb595947157de706e1cc42b'],
['org.signal:ringrtc-android:2.1.0',
'f138f87b3b24a36d670dd27b4c6bcbbd922eb6ff4f0e018619d4f92a7a5ae53d'],
['org.signal:signal-metadata-java:0.1.2',
'6aaeb6a33bf3161a3e6ac9db7678277f7a4cf5a2c96b84342e4007ee49bab1bd'],