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

Commit 075952fa authored by Bernardo Rufino's avatar Bernardo Rufino Committed by Automerger Merge Worker
Browse files

Merge "Use appendFrom in LazyValue.writeToParcel()" am: 730b6cfb

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1821492

Change-Id: I62192f0e179540552fec8e124581c717c867f09e
parents cf13a4b1 730b6cfb
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -3486,15 +3486,7 @@ public final class Parcel {

        public void writeToParcel(Parcel out) {
            if (mObject == null) {
                int restore = mSource.dataPosition();
                try {
                    mSource.setDataPosition(mPosition);
                    out.writeInt(mSource.readInt()); // Type
                    out.writeInt(mSource.readInt()); // Length
                    out.appendFrom(mSource, mSource.dataPosition(), mLength);
                } finally {
                    mSource.setDataPosition(restore);
                }
                out.appendFrom(mSource, mPosition, mLength + 8);
            } else {
                out.writeValue(mObject);
            }