From 6df4f6f7bda68afeba5a86b82942025620cf593d Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 18 Apr 2019 17:01:40 +0200 Subject: [PATCH] Do not show correspondent asked for video dialog while in call if video disabled globally + fixed crash --- app/src/main/java/org/linphone/call/CallActivity.java | 3 ++- .../java/org/linphone/settings/AccountSettingsFragment.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/linphone/call/CallActivity.java b/app/src/main/java/org/linphone/call/CallActivity.java index e89005e6f..fc0812e8a 100644 --- a/app/src/main/java/org/linphone/call/CallActivity.java +++ b/app/src/main/java/org/linphone/call/CallActivity.java @@ -240,10 +240,11 @@ public class CallActivity extends LinphoneGenericActivity mStatus.refreshStatusItems(call); } } else if (state == State.UpdatedByRemote) { - // If the correspondent proposes mVideo while audio call + // If the correspondent proposes video while audio call boolean videoEnabled = LinphonePreferences.instance().isVideoEnabled(); if (!videoEnabled) { acceptCallUpdate(false); + return; } boolean remoteVideo = call.getRemoteParams().videoEnabled(); diff --git a/app/src/main/java/org/linphone/settings/AccountSettingsFragment.java b/app/src/main/java/org/linphone/settings/AccountSettingsFragment.java index f89373c81..3a36a9fd8 100644 --- a/app/src/main/java/org/linphone/settings/AccountSettingsFragment.java +++ b/app/src/main/java/org/linphone/settings/AccountSettingsFragment.java @@ -259,6 +259,10 @@ public class AccountSettingsFragment extends Fragment { new SettingListenerBase() { @Override public void onTextValueChanged(String newValue) { + if (newValue.isEmpty()) { + return; + } + if (mAuthInfo != null) { mAuthInfo.setDomain(newValue); } else {