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

Commit eae93b4c authored by Yorke Lee's avatar Yorke Lee Committed by Android Git Automerger
Browse files

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

* commit 'c9fe671f':
  Update call capabilities when call is removed
parents 1ff01964 c9fe671f
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 */);
        }
    }

    /**