Merge "Use appendFrom in LazyValue.writeToParcel()" am: 730b6cfbc1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1821492 Change-Id: I62192f0e179540552fec8e124581c717c867f09e
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user