use of com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.CallQuality in project android_frameworks_opt_telephony by LineageOS.
the class InProgressCallSessionTest method testAddCallQualityEvent.
@Test
@SmallTest
public void testAddCallQualityEvent() {
CallQuality cq = new CallQuality();
cq.downlinkLevel = CallQuality.CallQualityLevel.GOOD;
cq.uplinkLevel = CallQuality.CallQualityLevel.GOOD;
CallSessionEventBuilder builder = new CallSessionEventBuilder(TelephonyProto.TelephonyCallSession.Event.Type.CALL_QUALITY_CHANGED).setCallQuality(cq);
mCallSession.addEvent(builder);
assertEquals(builder.build(), mCallSession.events.getFirst());
}
use of com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.CallQuality in project android_frameworks_opt_telephony by LineageOS.
the class InProgressCallSessionTest method testAddCallQualitySummaryEvent.
@Test
@SmallTest
public void testAddCallQualitySummaryEvent() {
SignalStrength ss1 = new SignalStrength();
ss1.lteSnr = 22;
SignalStrength ss2 = new SignalStrength();
ss2.lteSnr = 44;
CallQuality cq1 = new CallQuality();
cq1.downlinkLevel = CallQuality.CallQualityLevel.GOOD;
cq1.uplinkLevel = CallQuality.CallQualityLevel.GOOD;
CallQuality cq2 = new CallQuality();
cq1.downlinkLevel = CallQuality.CallQualityLevel.BAD;
cq1.uplinkLevel = CallQuality.CallQualityLevel.BAD;
CallQualitySummary cqs = new CallQualitySummary();
cqs.totalGoodQualityDurationInSeconds = 2;
cqs.totalBadQualityDurationInSeconds = 3;
cqs.totalDurationWithQualityInformationInSeconds = 5;
cqs.snapshotOfWorstSsWithGoodQuality = cq2;
cqs.snapshotOfBestSsWithGoodQuality = cq2;
cqs.snapshotOfWorstSsWithBadQuality = cq1;
cqs.snapshotOfBestSsWithBadQuality = cq1;
cqs.worstSsWithGoodQuality = ss1;
cqs.bestSsWithGoodQuality = ss2;
cqs.worstSsWithBadQuality = ss1;
cqs.bestSsWithBadQuality = ss2;
CallSessionEventBuilder builder = new CallSessionEventBuilder(TelephonyProto.TelephonyCallSession.Event.Type.CALL_QUALITY_CHANGED).setCallQualitySummaryDl(cqs).setCallQualitySummaryUl(cqs);
mCallSession.addEvent(builder);
assertEquals(builder.build(), mCallSession.events.getFirst());
}
Aggregations