Example usage for android.os Parcel readBundle

List of usage examples for android.os Parcel readBundle

Introduction

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

Prototype

public final Bundle readBundle() 

Source Link

Document

Read and return a new Bundle object from the parcel at the current dataPosition().

Usage

From source file:android.app.Notification.java

/**
 * Unflatten the notification from a parcel.
 *//*from w w w  .j  a  v a  2s. c  om*/
public Notification(Parcel parcel) {
    int version = parcel.readInt();

    when = parcel.readLong();
    icon = parcel.readInt();
    number = parcel.readInt();
    if (parcel.readInt() != 0) {
        contentIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        deleteIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        contentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        largeIcon = Bitmap.CREATOR.createFromParcel(parcel);
    }
    defaults = parcel.readInt();
    flags = parcel.readInt();
    if (parcel.readInt() != 0) {
        sound = Uri.CREATOR.createFromParcel(parcel);
    }

    audioStreamType = parcel.readInt();
    vibrate = parcel.createLongArray();
    ledARGB = parcel.readInt();
    ledOnMS = parcel.readInt();
    ledOffMS = parcel.readInt();
    iconLevel = parcel.readInt();

    if (parcel.readInt() != 0) {
        fullScreenIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }

    priority = parcel.readInt();

    kind = parcel.createStringArray(); // may set kind to null

    if (parcel.readInt() != 0) {
        extras = parcel.readBundle();
    }

    actions = parcel.createTypedArray(Action.CREATOR);
    if (parcel.readInt() != 0) {
        bigContentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
}