Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d37c3a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[bug fix] Handle the case when rfFieldOnTime is not set in OemLog." into main

parents 989747ab 92c596ab
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -142,8 +142,11 @@ public final class OemLogItems implements Parcelable {
        dest.writeByteArray(mCommandApdus);
        dest.writeInt(mResponseApdus.length);
        dest.writeByteArray(mResponseApdus);
        dest.writeBoolean(mRfFieldOnTime != null);
        if (mRfFieldOnTime != null) {
            dest.writeLong(mRfFieldOnTime.getEpochSecond());
            dest.writeInt(mRfFieldOnTime.getNano());
        }
        dest.writeParcelable(mTag, 0);
    }

@@ -305,7 +308,12 @@ public final class OemLogItems implements Parcelable {
        in.readByteArray(this.mCommandApdus);
        this.mResponseApdus = new byte[in.readInt()];
        in.readByteArray(this.mResponseApdus);
        boolean isRfFieldOnTimeSet = in.readBoolean();
        if (isRfFieldOnTimeSet) {
            this.mRfFieldOnTime = Instant.ofEpochSecond(in.readLong(), in.readInt());
        } else {
            this.mRfFieldOnTime = null;
        }
        this.mTag = in.readParcelable(Tag.class.getClassLoader(), Tag.class);
    }