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

Commit c9fe671f authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Update call capabilities when call is removed" into lmp-dev

parents 346e1e7d 604a90f5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -557,8 +557,12 @@ final class Call implements CreateConnectionResponse {
    }

    void setCallCapabilities(int callCapabilities) {
        setCallCapabilities(callCapabilities, false /* forceUpdate */);
    }

    void setCallCapabilities(int callCapabilities, boolean forceUpdate) {
        Log.v(this, "setCallCapabilities: %s", PhoneCapabilities.toString(callCapabilities));
        if (mCallCapabilities != callCapabilities) {
        if (forceUpdate || mCallCapabilities != callCapabilities) {
           mCallCapabilities = callCapabilities;
            for (Listener l : mListeners) {
                l.onCallCapabilitiesChanged(this);
+8 −0
Original line number Diff line number Diff line
@@ -996,6 +996,14 @@ public final class CallsManager extends Call.ListenerBase {
            }
            updateForegroundCall();
        }

        // Now that a call has been removed, other calls may gain new call capabilities (for
        // example, if only one call is left, it is now add-call capable again). Trigger the
        // recalculation of the call's current capabilities by forcing an update. (See
        // InCallController.toParcelableCall()).
        for (Call otherCall : mCalls) {
            otherCall.setCallCapabilities(call.getCallCapabilities(), true /* forceUpdate */);
        }
    }

    /**