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

Commit 9a11c438 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

Session2Token: Write Session2Link in writeToParcel()

This fixes MediaController2's connection failure when the token is from
the remote process.

Test: Build and run CTS test
Change-Id: Ic44b31b0088bc59ead4d341c27eebc57beac7d20
parent 842af1ec
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -152,9 +152,7 @@ public final class Session2Token implements Parcelable {
        mType = in.readInt();
        mPackageName = in.readString();
        mServiceName = in.readString();
        // TODO: Uncomment below and stop hardcode mSessionLink
        mSessionLink = null;
        //mSessionLink = ISession.Stub.asInterface(in.readStrongBinder());
        mSessionLink = Session2Link.CREATOR.createFromParcel(in);
        mComponentName = ComponentName.unflattenFromString(in.readString());
    }

@@ -164,8 +162,7 @@ public final class Session2Token implements Parcelable {
        dest.writeInt(mType);
        dest.writeString(mPackageName);
        dest.writeString(mServiceName);
        // TODO: Uncomment below
        //dest.writeStrongBinder(mSessionLink.getBinder());
        mSessionLink.writeToParcel(dest, flags);
        dest.writeString(mComponentName == null ? "" : mComponentName.flattenToString());
    }