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

Commit f211ce79 authored by Jay Shrauner's avatar Jay Shrauner
Browse files

Fix NPE when disconnect cause wasn't set

Ensure DisconnectCause is set when fail to make a call.

Bug:17681453
Change-Id: I31466dd6c7d71cec5ee5c44789fd30bbef80017d
parent b63254cf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -176,7 +176,8 @@ final class CreateConnectionProcessor {
        } else {
            Log.v(this, "attemptNextPhoneAccount, no more accounts, failing");
            if (mResponse != null) {
                mResponse.handleCreateConnectionFailure(mLastErrorDisconnectCause);
                mResponse.handleCreateConnectionFailure(mLastErrorDisconnectCause != null ?
                        mLastErrorDisconnectCause : new DisconnectCause(DisconnectCause.ERROR));
                mResponse = null;
                mCall.clearConnectionService();
            }
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ public final class InCallToneMonitor extends CallsManagerListenerBase {
            return;
        }

        if (newState == CallState.DISCONNECTED) {
        if (newState == CallState.DISCONNECTED && call.getDisconnectCause() != null) {
            int toneToPlay = InCallTonePlayer.TONE_INVALID;

            Log.v(this, "Disconnect cause: %s.", call.getDisconnectCause());