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

Commit 64bb3fef authored by Alex Dadukin's avatar Alex Dadukin Committed by Android (Google) Code Review
Browse files

Merge "Fix BadParcelableException when transferInitiatorUserHandle is null" into main

parents b363ed1d 027afce1
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ public final class RoutingSessionInfo implements Parcelable {
        mControlHints = src.readBundle();
        mIsSystemSession = src.readBoolean();
        mTransferReason = src.readInt();
        mTransferInitiatorUserHandle = src.readParcelable(null, android.os.UserHandle.class);
        mTransferInitiatorUserHandle = UserHandle.readFromParcel(src);
        mTransferInitiatorPackageName = src.readString();
    }

@@ -417,11 +417,7 @@ public final class RoutingSessionInfo implements Parcelable {
        dest.writeBundle(mControlHints);
        dest.writeBoolean(mIsSystemSession);
        dest.writeInt(mTransferReason);
        if (mTransferInitiatorUserHandle != null) {
            mTransferInitiatorUserHandle.writeToParcel(dest, /* flags= */ 0);
        } else {
            dest.writeParcelable(null, /* flags= */ 0);
        }
        UserHandle.writeToParcel(mTransferInitiatorUserHandle, dest);
        dest.writeString(mTransferInitiatorPackageName);
    }