Merge "Fix read/write parcel of CallAttributes"

This commit is contained in:
Jordan Liu
2019-02-01 01:20:53 +00:00
committed by Gerrit Code Review

View File

@@ -50,10 +50,9 @@ public class CallAttributes implements Parcelable {
} }
private CallAttributes(Parcel in) { private CallAttributes(Parcel in) {
mPreciseCallState = (PreciseCallState) this.mPreciseCallState = in.readParcelable(PreciseCallState.class.getClassLoader());
in.readValue(PreciseCallState.class.getClassLoader()); this.mNetworkType = in.readInt();
mNetworkType = in.readInt(); this.mCallQuality = in.readParcelable(CallQuality.class.getClassLoader());
mCallQuality = (CallQuality) in.readValue(CallQuality.class.getClassLoader());
} }
// getters // getters
@@ -134,9 +133,9 @@ public class CallAttributes implements Parcelable {
* {@link Parcelable#writeToParcel} * {@link Parcelable#writeToParcel}
*/ */
public void writeToParcel(Parcel dest, @Parcelable.WriteFlags int flags) { public void writeToParcel(Parcel dest, @Parcelable.WriteFlags int flags) {
mPreciseCallState.writeToParcel(dest, flags); dest.writeParcelable(mPreciseCallState, flags);
dest.writeInt(mNetworkType); dest.writeInt(mNetworkType);
mCallQuality.writeToParcel(dest, flags); dest.writeParcelable(mCallQuality, flags);
} }
public static final Parcelable.Creator<CallAttributes> CREATOR = new Parcelable.Creator() { public static final Parcelable.Creator<CallAttributes> CREATOR = new Parcelable.Creator() {