Compare commits

...

2 Commits

Author SHA1 Message Date
Greyson Parrelli
efa80ab939 Bump version to 4.47.7 2019-09-27 23:30:26 -04:00
Curt Brune
e58823f469 Localize call audio and video activation code 2019-09-27 23:22:48 -04:00
2 changed files with 25 additions and 25 deletions

View File

@@ -293,14 +293,12 @@ dependencyVerification {
} }
def canonicalVersionCode = 528 def canonicalVersionCode = 528
def canonicalVersionName = "4.47.6" def canonicalVersionName = "4.47.7"
def postFixSize = 10 def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1, def abiPostFix = ['armeabi-v7a' : 6,
'arm64-v8a' : 2, 'arm64-v8a' : 7,
'x86' : 3, 'universal' : 8]
'x86_64' : 4,
'universal' : 5]
android { android {
flavorDimensions "none" flavorDimensions "none"
@@ -347,7 +345,7 @@ android {
abi { abi {
enable true enable true
reset() reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' include 'armeabi-v7a', 'arm64-v8a'
universalApk true universalApk true
} }
} }

View File

@@ -599,21 +599,7 @@ public class WebRtcCallService extends Service implements PeerConnection.Observe
} }
} }
private void handleCallConnected(Intent intent) { private void activateCallMedia() {
if (callState != CallState.STATE_REMOTE_RINGING && callState != CallState.STATE_LOCAL_RINGING) {
Log.w(TAG, "Ignoring call connected for unknown state: " + callState);
return;
}
if (!Util.isEquals(this.callId, getCallId(intent))) {
Log.w(TAG, "Ignoring connected for unknown call id: " + getCallId(intent));
return;
}
if (recipient == null || peerConnection == null || dataChannel == null) {
throw new AssertionError("assert");
}
audioManager.startCommunication(callState == CallState.STATE_REMOTE_RINGING); audioManager.startCommunication(callState == CallState.STATE_REMOTE_RINGING);
bluetoothStateManager.setWantsConnection(true); bluetoothStateManager.setWantsConnection(true);
@@ -639,6 +625,24 @@ public class WebRtcCallService extends Service implements PeerConnection.Observe
.build().toByteArray()), false)); .build().toByteArray()), false));
} }
private void handleCallConnected(Intent intent) {
if (callState != CallState.STATE_REMOTE_RINGING) {
Log.w(TAG, "Ignoring call connected for unknown state: " + callState);
return;
}
if (!Util.isEquals(this.callId, getCallId(intent))) {
Log.w(TAG, "Ignoring connected for unknown call id: " + getCallId(intent));
return;
}
if (recipient == null || peerConnection == null || dataChannel == null) {
throw new AssertionError("assert");
}
activateCallMedia();
}
private void handleBusyCall(Intent intent) { private void handleBusyCall(Intent intent) {
Recipient recipient = getRemoteRecipient(intent); Recipient recipient = getRemoteRecipient(intent);
long callId = getCallId(intent); long callId = getCallId(intent);
@@ -735,9 +739,7 @@ public class WebRtcCallService extends Service implements PeerConnection.Observe
this.peerConnection.setVideoEnabled(false); this.peerConnection.setVideoEnabled(false);
this.dataChannel.send(new DataChannel.Buffer(ByteBuffer.wrap(Data.newBuilder().setConnected(Connected.newBuilder().setId(this.callId)).build().toByteArray()), false)); this.dataChannel.send(new DataChannel.Buffer(ByteBuffer.wrap(Data.newBuilder().setConnected(Connected.newBuilder().setId(this.callId)).build().toByteArray()), false));
intent.putExtra(EXTRA_CALL_ID, callId); activateCallMedia();
intent.putExtra(EXTRA_REMOTE_ADDRESS, recipient.getAddress());
handleCallConnected(intent);
} }
private void handleDenyCall(Intent intent) { private void handleDenyCall(Intent intent) {