Example usage for android.os Parcel writeStrongInterface

List of usage examples for android.os Parcel writeStrongInterface

Introduction

In this page you can find the example usage for android.os Parcel writeStrongInterface.

Prototype

public final void writeStrongInterface(IInterface val) 

Source Link

Document

Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed.

Usage

From source file:com.oasisfeng.nevo.StatusBarNotificationEvo.java

/** Write all fields except the Notification which is passed as IPC holder */
@Override/*from   w w  w. j  a  v a2s . c  o m*/
public void writeToParcel(final Parcel out, final int flags) {
    if ((flags & FLAG_WRITE_AS_ORIGINAL) != 0) {
        super.writeToParcel(out, flags & ~FLAG_WRITE_AS_ORIGINAL);
        return;
    }
    out.writeInt(PARCEL_MAGIC);
    out.writeString(getPackageName());
    out.writeInt(getId());
    if (getTag() != null) {
        out.writeInt(1);
        out.writeString(getTag());
    } else
        out.writeInt(0);
    out.writeInt(getUid(this));
    getUser().writeToParcel(out, flags);
    out.writeLong(getPostTime());
    out.writeStrongInterface(notification == null ? holder : new NotificationHolder(notification)); // The local copy of notification is "dirty" (possibly modified), hence needs to be updated.
}