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

The following examples show how to use android.app.PendingIntent#readPendingIntentOrNullFromParcel() . 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
Source File: PendingIntentData.java    From container with GNU General Public License v3.0 5 votes vote down vote up
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 File: NotificationData.java    From Status with 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 File: RemoteViews.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
public SetPendingIntentTemplate(Parcel parcel) {
    viewId = parcel.readInt();
    pendingIntentTemplate = PendingIntent.readPendingIntentOrNullFromParcel(parcel);
}
 
Example 4
Source File: RemoteViews.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
public SetOnClickPendingIntent(Parcel parcel) {
    viewId = parcel.readInt();
    pendingIntent = PendingIntent.readPendingIntentOrNullFromParcel(parcel);
}
 
Example 5
Source File: PendingIntentData.java    From container with GNU General Public License v3.0 4 votes vote down vote up
protected PendingIntentData(Parcel source) {
    this.creator = source.readString();
    this.pendingIntent = PendingIntent.readPendingIntentOrNullFromParcel(source);
}
 
Example 6
Source File: ActionData.java    From Status with 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();
}