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

Commit f55ba05c authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

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

Merge "ParcelFileDescriptor: Add comments to warn that parcelling must stay in sync with Parcel.cpp implementation"
parents 672fcd5c 8b85164c
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) {