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

The following examples show how to use android.os.Parcel#writeParcelableList() . 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 want to check out the right sidebar which shows the related API usage.
Example 1
/** 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
/** 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
@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
@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
@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 Project: NineGridView   File: NineGridView.java    License: 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 Project: android_9.0.0_r45   File: FillRequest.java    License: 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
@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
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte((byte) (mSingleDevice ? 1 : 0));
    dest.writeParcelableList(mDeviceFilters, flags);
}