Java Code Examples for android.os.Parcel#readParcelableList()

The following examples show how to use android.os.Parcel#readParcelableList() . 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
/**
 * @hide
 */
protected NotificationChannelGroup(Parcel in) {
    if (in.readByte() != 0) {
        mId = in.readString();
    } else {
        mId = null;
    }
    mName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    if (in.readByte() != 0) {
        mDescription = in.readString();
    } else {
        mDescription = null;
    }
    in.readParcelableList(mChannels, NotificationChannel.class.getClassLoader());
    mBlocked = in.readBoolean();
}
 
Example 2
Source Project: NineGridView   File: NineGridView.java    License: Apache License 2.0 6 votes vote down vote up
private SavedViewState(Parcel source)
{
    super(source);
    singleImageSize = source.readInt();
    singleImageRatio = source.readFloat();
    spaceSize = source.readInt();
    columnCount = source.readInt();
    rawCount = source.readInt();
    maxNum = source.readInt();
    isEditMode = source.readByte() == (byte) 1;
    icAddMoreResId = source.readInt();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
    {
        dataList = source.readParcelableList(dataList, NineGridView.class.getClassLoader());
    } else
    {
        dataList = source.readArrayList(NineGridBean.class.getClassLoader());
    }
    icDeleteResId = source.readInt();
    ratioDelete = source.readFloat();
}
 
Example 3
/** Read from Parcel. */
private ClientTransaction(Parcel in) {
    mClient = (IApplicationThread) in.readStrongBinder();
    final boolean readActivityToken = in.readBoolean();
    if (readActivityToken) {
        mActivityToken = in.readStrongBinder();
    }
    mLifecycleStateRequest = in.readParcelable(getClass().getClassLoader());
    final boolean readActivityCallbacks = in.readBoolean();
    if (readActivityCallbacks) {
        mActivityCallbacks = new ArrayList<>();
        in.readParcelableList(mActivityCallbacks, getClass().getClassLoader());
    }
}
 
Example 4
/** Read from Parcel. */
private ClientTransaction(Parcel in) {
    mClient = (IApplicationThread) in.readStrongBinder();
    final boolean readActivityToken = in.readBoolean();
    if (readActivityToken) {
        mActivityToken = in.readStrongBinder();
    }
    mLifecycleStateRequest = in.readParcelable(getClass().getClassLoader());
    final boolean readActivityCallbacks = in.readBoolean();
    if (readActivityCallbacks) {
        mActivityCallbacks = new ArrayList<>();
        in.readParcelableList(mActivityCallbacks, getClass().getClassLoader());
    }
}
 
Example 5
/** {@hide} */
PictureInPictureParams(Parcel in) {
    if (in.readInt() != 0) {
        mAspectRatio = new Rational(in.readInt(), in.readInt());
    }
    if (in.readInt() != 0) {
        mUserActions = new ArrayList<>();
        in.readParcelableList(mUserActions, RemoteAction.class.getClassLoader());
    }
    if (in.readInt() != 0) {
        mSourceRectHint = Rect.CREATOR.createFromParcel(in);
    }
}
 
Example 6
private PictureInPictureArgs(Parcel in) {
    if (in.readInt() != 0) {
        mAspectRatio = new Rational(in.readInt(), in.readInt());
    }
    if (in.readInt() != 0) {
        mUserActions = new ArrayList<>();
        in.readParcelableList(mUserActions, RemoteAction.class.getClassLoader());
    }
    if (in.readInt() != 0) {
        mSourceRectHint = Rect.CREATOR.createFromParcel(in);
    }
}
 
Example 7
Source Project: android_9.0.0_r45   File: FillRequest.java    License: Apache License 2.0 5 votes vote down vote up
private FillRequest(@NonNull Parcel parcel) {
    mId = parcel.readInt();
    mContexts = new ArrayList<>();
    parcel.readParcelableList(mContexts, null);

    mClientState = parcel.readBundle();
    mFlags = parcel.readInt();
}
 
Example 8
private static List<ParcelUuid> readUuids(Parcel in) {
    return in.readParcelableList(new ArrayList<>(), ParcelUuid.class.getClassLoader());
}
 
Example 9
private AssociationRequest(Parcel in) {
    this(
        in.readByte() != 0,
        in.readParcelableList(new ArrayList<>(), AssociationRequest.class.getClassLoader()));
}