forked from mirror/monocles_chat
remove soft disable flag when attempting call
(cherry picked from commit 69425e677cde4a09f69a11b4c0549807b0d4cbb2)
This commit is contained in:
parent
00a0e950f2
commit
eecdfd6145
2 changed files with 7 additions and 0 deletions
|
@ -287,6 +287,9 @@ public class Account extends AbstractEntity implements AvatarService.Avatarable
|
|||
}
|
||||
|
||||
public boolean setOption(final int option, final boolean value) {
|
||||
if (value && (option == OPTION_DISABLED || option == OPTION_SOFT_DISABLED)) {
|
||||
this.setStatus(State.OFFLINE);
|
||||
}
|
||||
final int before = this.options;
|
||||
if (value) {
|
||||
this.options |= 1 << option;
|
||||
|
|
|
@ -2435,6 +2435,10 @@ public class ConversationFragment extends XmppFragment
|
|||
Toast.makeText(getActivity(), R.string.only_one_call_at_a_time, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
final Account account = conversation.getAccount();
|
||||
if (account.setOption(Account.OPTION_SOFT_DISABLED, false)) {
|
||||
activity.xmppConnectionService.updateAccount(account);
|
||||
}
|
||||
final Contact contact = conversation.getContact();
|
||||
if (contact.getPresences().anySupport(Namespace.JINGLE_MESSAGE)) {
|
||||
triggerRtpSession(contact.getAccount(), contact.getJid().asBareJid(), action);
|
||||
|
|
Loading…
Add table
Reference in a new issue