Java Code Examples for android.app.PendingIntent#readPendingIntentOrNullFromParcel()

The following examples show how to use android.app.PendingIntent#readPendingIntentOrNullFromParcel() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public static PendingIntent readPendingIntent(IBinder binder) {
    Parcel parcel = Parcel.obtain();
    parcel.writeStrongBinder(binder);
    parcel.setDataPosition(0);
    try {
        return PendingIntent.readPendingIntentOrNullFromParcel(parcel);
    } finally {
        parcel.recycle();
    }
}
 
Example 2
Source Project: Status   File: NotificationData.java    License: Apache License 2.0 5 votes vote down vote up
protected NotificationData(Parcel in) {
    category = in.readString();
    title = in.readString();
    subtitle = in.readString();
    packageName = in.readString();
    group = in.readString();
    key = in.readString();
    tag = in.readString();
    priority = in.readInt();
    id = in.readInt();
    color = in.readInt();
    iconRes = in.readInt();
    isAlert = in.readByte() == 1;
    if (isAlert) {
        if (in.readByte() == 1) largeIcon = Bitmap.CREATOR.createFromParcel(in);

        intent = PendingIntent.readPendingIntentOrNullFromParcel(in);

        int length = in.readInt();
        actions = new ActionData[length];
        for (int i = 0; i < length; i++) {
            actions[i] = in.readParcelable(ActionData.class.getClassLoader());
        }

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            unloadedIcon = in.readParcelable(Icon.class.getClassLoader());
            unloadedLargeIcon = in.readParcelable(Icon.class.getClassLoader());
        }
    }
}
 
Example 3
Source Project: android_9.0.0_r45   File: RemoteViews.java    License: Apache License 2.0 4 votes vote down vote up
public SetPendingIntentTemplate(Parcel parcel) {
    viewId = parcel.readInt();
    pendingIntentTemplate = PendingIntent.readPendingIntentOrNullFromParcel(parcel);
}
 
Example 4
Source Project: android_9.0.0_r45   File: RemoteViews.java    License: Apache License 2.0 4 votes vote down vote up
public SetOnClickPendingIntent(Parcel parcel) {
    viewId = parcel.readInt();
    pendingIntent = PendingIntent.readPendingIntentOrNullFromParcel(parcel);
}
 
Example 5
protected PendingIntentData(Parcel source) {
    this.creator = source.readString();
    this.pendingIntent = PendingIntent.readPendingIntentOrNullFromParcel(source);
}
 
Example 6
Source Project: Status   File: ActionData.java    License: Apache License 2.0 4 votes vote down vote up
protected ActionData(Parcel in) {
    super(in.readInt(), in.readString(), PendingIntent.readPendingIntentOrNullFromParcel(in));
    packageName = in.readString();
}