Merge "Use appendFrom in LazyValue.writeToParcel()"
This commit is contained in:
@@ -3445,15 +3445,7 @@ public final class Parcel {
|
|||||||
|
|
||||||
public void writeToParcel(Parcel out) {
|
public void writeToParcel(Parcel out) {
|
||||||
if (mObject == null) {
|
if (mObject == null) {
|
||||||
int restore = mSource.dataPosition();
|
out.appendFrom(mSource, mPosition, mLength + 8);
|
||||||
try {
|
|
||||||
mSource.setDataPosition(mPosition);
|
|
||||||
out.writeInt(mSource.readInt()); // Type
|
|
||||||
out.writeInt(mSource.readInt()); // Length
|
|
||||||
out.appendFrom(mSource, mSource.dataPosition(), mLength);
|
|
||||||
} finally {
|
|
||||||
mSource.setDataPosition(restore);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
out.writeValue(mObject);
|
out.writeValue(mObject);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user