diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 000000000..7643783a8 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000..79ee123c2 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt index 62ad516f5..4d7d7dc95 100644 --- a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt +++ b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt @@ -241,7 +241,6 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() { override fun onEncryptionChanged(call: Call, on: Boolean, authenticationToken: String?) { Log.i("$TAG Call encryption changed, updating...") updateEncryption() - callMediaEncryptionModel.update(call) } override fun onAuthenticationTokenVerified(call: Call, verified: Boolean) { @@ -346,6 +345,15 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() { if (corePreferences.automaticallyStartCallRecording) { isRecording.postValue(call.params.isRecording) } + + // MediaEncryption None & SRTP won't be notified through onEncryptionChanged callback, + // we have to do it manually to leave the "wait for encryption" state + when (call.currentParams.mediaEncryption) { + MediaEncryption.SRTP, MediaEncryption.None -> { + updateEncryption() + } + else -> {} + } } } @@ -1035,6 +1043,7 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() { } } waitingForEncryptionInfo.postValue(false) + callMediaEncryptionModel.update(currentCall) } @WorkerThread