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

Commit e90c2705 authored by Joe Antonetti's avatar Joe Antonetti
Browse files

[Handoff][4/N] Fix Broken Parcelling of RemoteTask

A small issue in `RemoteTask`'s implementation of `Parcelable` was found in testing - `writeString8()` would sometimes cause `readString()` to under-read, due to `readString()` defaulting to `readString16()`.

Test: Validated manually. CTS tests in the future will fully test this
Bug: 400970610
Flag: android.companion.enable_task_continuity
Change-Id: I6f7bc4fca3b38c5626d4671775e30397c3516df5
parent b54d9094
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -180,9 +180,9 @@ public final class RemoteTask implements Parcelable {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeInt(mId);
        dest.writeInt(mDeviceId);
        dest.writeString8(mLabel);
        dest.writeString(mLabel);
        dest.writeBoolean(mIsHandoffEnabled);
        dest.writeString8(mSourceDeviceName);
        dest.writeString(mSourceDeviceName);
        dest.writeInt(mLastUsedTimestampMillis);
        if (mIcon != null) {
            dest.writeInt(1);