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

Commit 34c9216c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix potential test issue related to metrics in ImsPhoneConnection." into sc-dev

parents 460c7215 3dac311b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.text.TextUtils;
import com.android.ims.ImsCall;
import com.android.ims.ImsException;
import com.android.ims.internal.ImsVideoCallProviderWrapper;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Connection;
import com.android.internal.telephony.Phone;
@@ -311,6 +312,10 @@ public class ImsPhoneConnection extends Connection implements
        }
    }

    @VisibleForTesting
    public void setTelephonyMetrics(TelephonyMetrics tm) {
        mMetrics = tm;
    }

    public void dispose() {
    }
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import com.android.internal.telephony.Connection;
import com.android.internal.telephony.GsmCdmaCall;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyTest;
import com.android.internal.telephony.metrics.TelephonyMetrics;
import com.android.internal.telephony.metrics.VoiceCallSessionStats;

import org.junit.After;
@@ -459,6 +460,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest {
        when(mImsPhone.getVoiceCallSessionStats()).thenReturn(stats);

        mConnectionUT = new ImsPhoneConnection(mImsPhone, imsCall, mImsCT, mForeGroundCall, false);
        mConnectionUT.setTelephonyMetrics(mock(TelephonyMetrics.class));
        CountDownLatch latch = new CountDownLatch(1);
        boolean[] receivedCountCallback = new boolean[1];
        mConnectionUT.addListener(new Connection.ListenerBase() {