下面列出了android.os.Parcel#writePersistableBundle ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/** Write from Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeTypedObject(mIntent, flags);
dest.writeInt(mIdent);
dest.writeTypedObject(mInfo, flags);
dest.writeTypedObject(mCurConfig, flags);
dest.writeTypedObject(mOverrideConfig, flags);
dest.writeTypedObject(mCompatInfo, flags);
dest.writeString(mReferrer);
dest.writeStrongInterface(mVoiceInteractor);
dest.writeInt(mProcState);
dest.writeBundle(mState);
dest.writePersistableBundle(mPersistentState);
dest.writeTypedList(mPendingResults, flags);
dest.writeTypedList(mPendingNewIntents, flags);
dest.writeBoolean(mIsForward);
dest.writeTypedObject(mProfilerInfo, flags);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(jobId);
dest.writePersistableBundle(extras);
dest.writeBundle(transientExtras);
if (clipData != null) {
dest.writeInt(1);
clipData.writeToParcel(dest, flags);
dest.writeInt(clipGrantFlags);
} else {
dest.writeInt(0);
}
dest.writeStrongBinder(callback);
dest.writeInt(overrideDeadlineExpired ? 1 : 0);
dest.writeTypedArray(mTriggeredContentUris, flags);
dest.writeStringArray(mTriggeredContentAuthorities);
if (network != null) {
dest.writeInt(1);
network.writeToParcel(dest, flags);
} else {
dest.writeInt(0);
}
dest.writeInt(stopReason);
dest.writeString(debugStopReason);
}
/** Write from Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeTypedObject(mIntent, flags);
dest.writeInt(mIdent);
dest.writeTypedObject(mInfo, flags);
dest.writeTypedObject(mCurConfig, flags);
dest.writeTypedObject(mOverrideConfig, flags);
dest.writeTypedObject(mCompatInfo, flags);
dest.writeString(mReferrer);
dest.writeStrongInterface(mVoiceInteractor);
dest.writeInt(mProcState);
dest.writeBundle(mState);
dest.writePersistableBundle(mPersistentState);
dest.writeTypedList(mPendingResults, flags);
dest.writeTypedList(mPendingNewIntents, flags);
dest.writeBoolean(mIsForward);
dest.writeTypedObject(mProfilerInfo, flags);
}
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(jobId);
out.writePersistableBundle(extras);
out.writeBundle(transientExtras);
if (clipData != null) {
out.writeInt(1);
clipData.writeToParcel(out, flags);
out.writeInt(clipGrantFlags);
} else {
out.writeInt(0);
}
out.writeParcelable(service, flags);
out.writeInt(constraintFlags);
out.writeTypedArray(triggerContentUris, flags);
out.writeLong(triggerContentUpdateDelay);
out.writeLong(triggerContentMaxDelay);
if (networkRequest != null) {
out.writeInt(1);
networkRequest.writeToParcel(out, flags);
} else {
out.writeInt(0);
}
out.writeLong(networkDownloadBytes);
out.writeLong(networkUploadBytes);
out.writeLong(minLatencyMillis);
out.writeLong(maxExecutionDelayMillis);
out.writeInt(isPeriodic ? 1 : 0);
out.writeInt(isPersisted ? 1 : 0);
out.writeLong(intervalMillis);
out.writeLong(flexMillis);
out.writeLong(initialBackoffMillis);
out.writeInt(backoffPolicy);
out.writeInt(hasEarlyConstraint ? 1 : 0);
out.writeInt(hasLateConstraint ? 1 : 0);
out.writeInt(priority);
out.writeInt(this.flags);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
TextUtils.writeToParcel(mLabel, dest, flags);
dest.writeStringList(mMimeTypes);
dest.writePersistableBundle(mExtras);
dest.writeLong(mTimeStamp);
}
static void write(Parcel parcel, Object bundle) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
parcel.writePersistableBundle((PersistableBundle) bundle);
} else {
parcel.writeBundle((Bundle) bundle);
}
}
/** @hide */
public void writeToParcelInternal(Parcel dest, int flags) {
dest.writeString(mType);
dest.writePersistableBundle(mArgs);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override public void writeToParcel(@Nullable PersistableBundle value, @NonNull Parcel dest, int flags) {
dest.writePersistableBundle(value);
}