use of android.telephony.CallAttributes in project android_frameworks_opt_telephony by LineageOS.
the class CallAttributesTest method testParcelUnparcelPreciseCallState.
@SmallTest
public void testParcelUnparcelPreciseCallState() {
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("PreciseCallState is not equal after parceled/unparceled", data.getPreciseCallState(), unparceledData.getPreciseCallState());
}
use of android.telephony.CallAttributes in project android_frameworks_opt_telephony by LineageOS.
the class CallAttributesTest method testParcelUnparcelNetworkType.
@SmallTest
public void testParcelUnparcelNetworkType() {
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("NetworkType is not equal after parceled/unparceled", data.getNetworkType(), unparceledData.getNetworkType());
}
use of android.telephony.CallAttributes 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());
}
Aggregations