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

Commit f6eebf40 authored by Cecilia's avatar Cecilia
Browse files

Fix the UI template data parcel reading.

Update the UI template data's parcel r/w with #readParcelable and #writeParcelable so it works for the BaseTemplateData's subclasses.

Bug: 231401631
Test: Tested locally
Change-Id: I64b0dd8cb781acd0f2badba7f87454ae9f72eb28
parent a2d26585
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ public final class SmartspaceTarget implements Parcelable {
        this.mAssociatedSmartspaceTargetId = in.readString();
        this.mSliceUri = in.readTypedObject(Uri.CREATOR);
        this.mWidget = in.readTypedObject(AppWidgetProviderInfo.CREATOR);
        this.mTemplateData = in.readTypedObject(BaseTemplateData.CREATOR);
        this.mTemplateData = in.readParcelable(/* loader= */null, BaseTemplateData.class);
    }

    private SmartspaceTarget(String smartspaceTargetId,
@@ -491,7 +491,7 @@ public final class SmartspaceTarget implements Parcelable {
        dest.writeString(this.mAssociatedSmartspaceTargetId);
        dest.writeTypedObject(this.mSliceUri, flags);
        dest.writeTypedObject(this.mWidget, flags);
        dest.writeTypedObject(this.mTemplateData, flags);
        dest.writeParcelable(this.mTemplateData, flags);
    }

    @Override