Search in sources :

Example 11 with CallQuality

use of android.telephony.CallQuality in project android_frameworks_opt_telephony by LineageOS.

the class CallAttributesTest method testParcelUnparcelCallQuality.

@SmallTest
public void testParcelUnparcelCallQuality() {
    CallQuality quality = new CallQuality();
    PreciseCallState pcs = new PreciseCallState();
    CallAttributes data = new CallAttributes(pcs, 10, quality);
    Parcel parcel = Parcel.obtain();
    data.writeToParcel(parcel, 0);
    parcel.setDataPosition(0);
    CallAttributes unparceledData = CallAttributes.CREATOR.createFromParcel(parcel);
    parcel.recycle();
    assertEquals("CallQuality is not equal after parceled/unparceled", data.getCallQuality(), unparceledData.getCallQuality());
}
Also used : PreciseCallState(android.telephony.PreciseCallState) CallQuality(android.telephony.CallQuality) Parcel(android.os.Parcel) CallAttributes(android.telephony.CallAttributes) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

CallQuality (android.telephony.CallQuality)11 Test (org.junit.Test)8 TelephonyTest (com.android.internal.telephony.TelephonyTest)7 CallQualitySummary (com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.CallQualitySummary)7 Parcel (android.os.Parcel)4 SmallTest (android.test.suitebuilder.annotation.SmallTest)4 CallAttributes (android.telephony.CallAttributes)3 PreciseCallState (android.telephony.PreciseCallState)3 CellSignalStrengthCdma (android.telephony.CellSignalStrengthCdma)1 CellSignalStrengthGsm (android.telephony.CellSignalStrengthGsm)1 CellSignalStrengthLte (android.telephony.CellSignalStrengthLte)1 CellSignalStrengthNr (android.telephony.CellSignalStrengthNr)1 CellSignalStrengthTdscdma (android.telephony.CellSignalStrengthTdscdma)1 CellSignalStrengthWcdma (android.telephony.CellSignalStrengthWcdma)1 SignalStrength (android.telephony.SignalStrength)1