public final class

Concierge

extends Object
java.lang.Object
   ↳ lineageos.os.Concierge

Class Overview

Simply, Concierge handles your parcels and makes sure they get marshalled and unmarshalled correctly when cross IPC boundaries even when there is a version mismatch between the client sdk level and the framework implementation.

On incoming parcel (to be unmarshalled):

     ParcelInfo incomingParcelInfo = Concierge.receiveParcel(incomingParcel);
     int parcelableVersion = incomingParcelInfo.getParcelVersion();

     // Do unmarshalling steps here iterating over every plausible version

     // Complete the process
     incomingParcelInfo.complete();
 

On outgoing parcel (to be marshalled):

     ParcelInfo outgoingParcelInfo = Concierge.prepareParcel(incomingParcel);

     // Do marshalling steps here iterating over every plausible version

     // Complete the process
     outgoingParcelInfo.complete();
 

Summary

Nested Classes
class Concierge.ParcelInfo Parcel header info specific to the Parcel object that is passed in via prepareParcel(Parcel) or receiveParcel(Parcel)
Public Methods
static Concierge.ParcelInfo prepareParcel(Parcel parcel)
Prepare a parcel for the Concierge.
static Concierge.ParcelInfo receiveParcel(Parcel parcel)
Tell the concierge to receive our parcel, so we can get information from it.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Concierge.ParcelInfo prepareParcel (Parcel parcel)

added in API level 5

Prepare a parcel for the Concierge. MUST CALL complete() AFTER MARSHALLING.

Parameters
parcel Parcel: Outgoing parcel to be marshalled
Returns
Concierge.ParcelInfo Concierge.ParcelInfo containing parcel information, specifically the version.

public static Concierge.ParcelInfo receiveParcel (Parcel parcel)

added in API level 5

Tell the concierge to receive our parcel, so we can get information from it. MUST CALL complete() AFTER UNMARSHALLING.

Parameters
parcel Parcel: Incoming parcel to be unmarshalled
Returns
Concierge.ParcelInfo Concierge.ParcelInfo containing parcel information, specifically the version.