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

Commit 8b85164c authored by Mike Lockwood's avatar Mike Lockwood
Browse files

ParcelFileDescriptor: Add comments to warn that parcelling must stay in sync...

ParcelFileDescriptor: Add comments to warn that parcelling must stay in sync with Parcel.cpp implementation

Change-Id: If9fcdada0b2dbaae4973ac236b02e527e2e6b198
parent 854fc92a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -821,6 +821,8 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
     */
    @Override
    public void writeToParcel(Parcel out, int flags) {
        // WARNING: This must stay in sync with Parcel::readParcelFileDescriptor()
        // in frameworks/native/libs/binder/Parcel.cpp
        if (mWrapped != null) {
            mWrapped.writeToParcel(out, flags);
        } else {
@@ -845,6 +847,8 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
            = new Parcelable.Creator<ParcelFileDescriptor>() {
        @Override
        public ParcelFileDescriptor createFromParcel(Parcel in) {
            // WARNING: This must stay in sync with Parcel::writeParcelFileDescriptor()
            // in frameworks/native/libs/binder/Parcel.cpp
            final FileDescriptor fd = in.readRawFileDescriptor();
            FileDescriptor commChannel = null;
            if (in.readInt() != 0) {