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

Commit 88336c2e authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Update foreground calls with child-parent call changes." into lmp-dev

parents 36e50968 66fe882a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -428,7 +428,8 @@ public final class BluetoothPhoneService extends Service {
        Call ringingCall = callsManager.getRingingCall();
        Call heldCall = callsManager.getHeldCall();

        Log.v(TAG, "Active: %s\nRinging: %s\nHeld: %s", activeCall, ringingCall, heldCall);
        // TODO: Keeping as Log.i for now.  Move to Log.d after L release if BT proves stable.
        Log.i(TAG, "Active: %s\nRinging: %s\nHeld: %s", activeCall, ringingCall, heldCall);

        if (chld == CHLD_TYPE_RELEASEHELD) {
            if (ringingCall != null) {
@@ -466,7 +467,7 @@ public final class BluetoothPhoneService extends Service {
            }
        } else if (chld == CHLD_TYPE_ADDHELDTOCONF) {
            if (activeCall != null) {
                if (activeCall != null && activeCall.can(PhoneCapabilities.MERGE_CONFERENCE)) {
                if (activeCall.can(PhoneCapabilities.MERGE_CONFERENCE)) {
                    activeCall.mergeConference();
                    return true;
                } else {
+9 −2
Original line number Diff line number Diff line
@@ -353,8 +353,15 @@ final class Call implements CreateConnectionResponse {
            component = mConnectionService.getComponentName().flattenToShortString();
        }

        return String.format(Locale.US, "[%s, %s, %s, %s, %d]", System.identityHashCode(this),
                mState, component, Log.piiHandle(mHandle), getVideoState());
        return String.format(Locale.US, "[%s, %s, %s, %s, %d, childs(%d), has_parent(%b), [%s]",
                System.identityHashCode(this),
                CallState.toString(mState),
                component,
                Log.piiHandle(mHandle),
                getVideoState(),
                getChildCalls().size(),
                getParentCall() != null,
                PhoneCapabilities.toString(getCallCapabilities()));
    }

    int getState() {
+4 −0
Original line number Diff line number Diff line
@@ -254,6 +254,8 @@ public final class CallsManager extends Call.ListenerBase {

    @Override
    public void onParentChanged(Call call) {
        // parent-child relationship affects which call should be foreground, so do an update.
        updateForegroundCall();
        for (CallsManagerListener listener : mListeners) {
            listener.onIsConferencedChanged(call);
        }
@@ -261,6 +263,8 @@ public final class CallsManager extends Call.ListenerBase {

    @Override
    public void onChildrenChanged(Call call) {
        // parent-child relationship affects which call should be foreground, so do an update.
        updateForegroundCall();
        for (CallsManagerListener listener : mListeners) {
            listener.onIsConferencedChanged(call);
        }