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

The following examples show how to use android.os.Parcel#writeParcelableList() . 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: ClientTransaction.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeStrongBinder(mClient.asBinder());
    final boolean writeActivityToken = mActivityToken != null;
    dest.writeBoolean(writeActivityToken);
    if (writeActivityToken) {
        dest.writeStrongBinder(mActivityToken);
    }
    dest.writeParcelable(mLifecycleStateRequest, flags);
    final boolean writeActivityCallbacks = mActivityCallbacks != null;
    dest.writeBoolean(writeActivityCallbacks);
    if (writeActivityCallbacks) {
        dest.writeParcelableList(mActivityCallbacks, flags);
    }
}
 
Example 2
Source File: ClientTransaction.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeStrongBinder(mClient.asBinder());
    final boolean writeActivityToken = mActivityToken != null;
    dest.writeBoolean(writeActivityToken);
    if (writeActivityToken) {
        dest.writeStrongBinder(mActivityToken);
    }
    dest.writeParcelable(mLifecycleStateRequest, flags);
    final boolean writeActivityCallbacks = mActivityCallbacks != null;
    dest.writeBoolean(writeActivityCallbacks);
    if (writeActivityCallbacks) {
        dest.writeParcelableList(mActivityCallbacks, flags);
    }
}
 
Example 3
Source File: PictureInPictureParams.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    if (mAspectRatio != null) {
        out.writeInt(1);
        out.writeInt(mAspectRatio.getNumerator());
        out.writeInt(mAspectRatio.getDenominator());
    } else {
        out.writeInt(0);
    }
    if (mUserActions != null) {
        out.writeInt(1);
        out.writeParcelableList(mUserActions, 0);
    } else {
        out.writeInt(0);
    }
    if (mSourceRectHint != null) {
        out.writeInt(1);
        mSourceRectHint.writeToParcel(out, 0);
    } else {
        out.writeInt(0);
    }
}
 
Example 4
Source File: NotificationChannelGroup.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (mId != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mId);
    } else {
        dest.writeByte((byte) 0);
    }
    TextUtils.writeToParcel(mName, dest, flags);
    if (mDescription != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mDescription);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeParcelableList(mChannels, flags);
    dest.writeBoolean(mBlocked);
}
 
Example 5
Source File: PictureInPictureArgs.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    if (mAspectRatio != null) {
        out.writeInt(1);
        out.writeInt(mAspectRatio.getNumerator());
        out.writeInt(mAspectRatio.getDenominator());
    } else {
        out.writeInt(0);
    }
    if (mUserActions != null) {
        out.writeInt(1);
        out.writeParcelableList(mUserActions, 0);
    } else {
        out.writeInt(0);
    }
    if (mSourceRectHint != null) {
        out.writeInt(1);
        mSourceRectHint.writeToParcel(out, 0);
    } else {
        out.writeInt(0);
    }
}
 
Example 6
Source File: NineGridView.java    From NineGridView with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags)
{
    super.writeToParcel(out, flags);
    out.writeInt(singleImageSize);
    out.writeFloat(singleImageRatio);
    out.writeInt(spaceSize);
    out.writeInt(columnCount);
    out.writeInt(rawCount);
    out.writeInt(maxNum);
    out.writeByte(isEditMode ? (byte) 1 : (byte) 0);
    out.writeInt(icAddMoreResId);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
    {
        out.writeParcelableList(dataList, 0);
    } else
    {
        out.writeList(dataList);
    }
    out.writeInt(icDeleteResId);
    out.writeFloat(ratioDelete);
}
 
Example 7
Source File: FillRequest.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mId);
    parcel.writeParcelableList(mContexts, flags);
    parcel.writeBundle(mClientState);
    parcel.writeInt(mFlags);
}
 
Example 8
Source File: BluetoothDeviceFilter.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(patternToString(getNamePattern()));
    dest.writeString(mAddress);
    dest.writeParcelableList(mServiceUuids, flags);
    dest.writeParcelableList(mServiceUuidMasks, flags);
}
 
Example 9
Source File: AssociationRequest.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte((byte) (mSingleDevice ? 1 : 0));
    dest.writeParcelableList(mDeviceFilters, flags);
}