Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4478300 authored by Bryce Lee's avatar Bryce Lee Committed by android-build-merger
Browse files

Disconnect calls when there is no call capable account available.

am: de0ac37d

* commit 'de0ac37d':
  Disconnect calls when there is no call capable account available.
parents 881a40b6 de0ac37d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -723,6 +723,11 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
            // If the account has been set, proceed to place the outgoing call.
            // Otherwise the connection will be initiated when the account is set by the user.
            call.startCreateConnection(mPhoneAccountRegistrar);
        } else if (mPhoneAccountRegistrar.getCallCapablePhoneAccounts(null, false).isEmpty()) {
            // If there are no call capable accounts, disconnect the call.
            markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.CANCELED,
                    "No registered PhoneAccounts"));
            markCallAsRemoved(call);
        }
    }