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

Commit 9abf7839 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Fix issue where conference gets logged when no CEP is enabled."

am: 603547b0

Change-Id: Iea9a23e62bb62d8034b9ff41f1d569954613854a
parents 56e9e907 603547b0
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -215,6 +215,14 @@ public final class CallLogManager extends CallsManagerListenerBase {
            return false;
            return false;
        }
        }


        // A conference call which had no children should not be logged; this case will occur on IMS
        // when no conference event package data is received.  We will have logged the participants
        // as they merge into the conference, so we should not log the conference itself.
        if (call.isConference() && !call.hadChildren() &&
                !call.hasProperty(Connection.PROPERTY_REMOTELY_HOSTED)) {
            return false;
        }

        // A child call of a conference which was remotely hosted; these didn't originate on this
        // A child call of a conference which was remotely hosted; these didn't originate on this
        // device and should not be logged.
        // device and should not be logged.
        if (call.getParentCall() != null && call.hasProperty(Connection.PROPERTY_REMOTELY_HOSTED)) {
        if (call.getParentCall() != null && call.hasProperty(Connection.PROPERTY_REMOTELY_HOSTED)) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -792,7 +792,7 @@ public class CallLogManagerTest extends TelecomTestCase {


    @SmallTest
    @SmallTest
    @Test
    @Test
    public void testLogConferenceWithNoChildren() {
    public void testDoNotLogConferenceWithNoChildren() {
        Call fakeCall = makeFakeCall(
        Call fakeCall = makeFakeCall(
                DisconnectCause.LOCAL, // disconnectCauseCode
                DisconnectCause.LOCAL, // disconnectCauseCode
                true, // isConference
                true, // isConference
@@ -808,7 +808,7 @@ public class CallLogManagerTest extends TelecomTestCase {
        );
        );
        when(fakeCall.hadChildren()).thenReturn(false);
        when(fakeCall.hadChildren()).thenReturn(false);


        assertTrue(mCallLogManager.shouldLogDisconnectedCall(fakeCall, CallState.DISCONNECTED,
        assertFalse(mCallLogManager.shouldLogDisconnectedCall(fakeCall, CallState.DISCONNECTED,
                false /* isCanceled */));
                false /* isCanceled */));
    }
    }