fix: 修复Entity使用Parcel序列化时丢失rowId的问题

pull/910/head
A Shuai 3 years ago
parent ada1f9f993
commit 56893b0d88
  1. 2
      PublicComponent/src/main/java/com/arialyy/aria/core/common/AbsEntity.java

@ -234,6 +234,7 @@ public abstract class AbsEntity extends DbEntity implements IEntity, Parcelable,
} }
@Override public void writeToParcel(Parcel dest, int flags) { @Override public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(this.rowID);
dest.writeLong(this.speed); dest.writeLong(this.speed);
dest.writeString(this.convertSpeed); dest.writeString(this.convertSpeed);
dest.writeInt(this.failNum); dest.writeInt(this.failNum);
@ -249,6 +250,7 @@ public abstract class AbsEntity extends DbEntity implements IEntity, Parcelable,
} }
protected AbsEntity(Parcel in) { protected AbsEntity(Parcel in) {
this.rowID = in.readLong();
this.speed = in.readLong(); this.speed = in.readLong();
this.convertSpeed = in.readString(); this.convertSpeed = in.readString();
this.failNum = in.readInt(); this.failNum = in.readInt();

Loading…
Cancel
Save