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

Commit de0ac37d authored by Bryce Lee's avatar Bryce Lee
Browse files

Disconnect calls when there is no call capable account available.

Bug: 25194479
Change-Id: I9e9c7d6d63e91b2979a4ebdd5e50674aa55d4fc7
parent 0f71e992
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);
        }
    }