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

The following examples show how to use android.os.Parcel#writeByte() . 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
@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 2
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (mId != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mId);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mExplanation != null) {
        dest.writeByte((byte) 1);
        dest.writeCharSequence(mExplanation);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mConfirmation != null) {
        dest.writeByte((byte) 1);
        dest.writeCharSequence(mConfirmation);
    } else {
        dest.writeByte((byte) 0);
    }
}
 
Example 3
Source Project: NClientV2   File: SimpleGallery.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(title);
    dest.writeInt(id);
    dest.writeInt(mediaId);
    dest.writeByte((byte)thumbnail.ordinal());
    dest.writeByte((byte)language.ordinal());
    //TAGS AREN'T WRITTEN
}
 
Example 4
Source Project: LeanbackTvSample   File: Content.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(id);
    dest.writeString(title);
    dest.writeByte((byte) (showTitle ? 1 : 0));
    dest.writeInt(contentCode);
}
 
Example 5
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(elementId);
  dest.writeByte((byte) (isRoot ? 1 : 0));
  dest.writeByte((byte) (isOrdered ? 1 : 0));
  dest.writeStringArray(children);
  dest.writeInt(subFrames.length);
  for (Id3Frame subFrame : subFrames) {
    dest.writeParcelable(subFrame, 0);
  }
}
 
Example 6
Source Project: px-android   File: ParcelableUtil.java    License: MIT License 5 votes vote down vote up
public static void writeOptional(final Parcel dest, @Nullable final Integer number) {
    if (number == null) {
        dest.writeByte((byte) 0);
    } else {
        dest.writeByte((byte) 1);
        dest.writeInt(number);
    }
}
 
Example 7
Source Project: DataLogger   File: HttpUploadTaskParameters.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int arg1) {
    parcel.writeString(method);
    parcel.writeString(customUserAgent);
    parcel.writeByte((byte) (usesFixedLengthStreamingMode ? 1 : 0));
    parcel.writeList(requestHeaders);
    parcel.writeList(requestParameters);
}
 
Example 8
Source Project: SimpleDialogFragments   File: Check.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeString(text);
    dest.writeInt(textResourceId);
    dest.writeByte((byte) (preset == null ? -1 : (preset ? 1 : 0)));
    dest.writeInt(presetId);
}
 
Example 9
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(elementId);
  dest.writeByte((byte) (isRoot ? 1 : 0));
  dest.writeByte((byte) (isOrdered ? 1 : 0));
  dest.writeStringArray(children);
  dest.writeInt(subFrames.length);
  for (Id3Frame subFrame : subFrames) {
    dest.writeParcelable(subFrame, 0);
  }
}
 
Example 10
@Override
public void writeToParcel(final Parcel dest, final int flags) {
	super.writeToParcel(dest, flags);
	if (features == null) {
		dest.writeByte((byte) 0);
	} else {
		dest.writeByte((byte) 1);
		dest.writeInt(features.value);
	}
}
 
Example 11
Source Project: a   File: UpdateInfoBean.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(lastVersion);
    parcel.writeString(url);
    parcel.writeString(detail);
    parcel.writeByte((byte) (upDate ? 1 : 0));
}
 
Example 12
Source Project: pjsip-android   File: SipAccountData.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int arg1) {
    parcel.writeString(username);
    parcel.writeString(password);
    parcel.writeString(realm);
    parcel.writeString(host);
    parcel.writeLong(port);
    parcel.writeByte((byte) (tcpTransport ? 1 : 0));
    parcel.writeString(authenticationType);
    parcel.writeString(contactUriParams);
    parcel.writeInt(regExpirationTimeout);
    parcel.writeString(guestDisplayName);
    parcel.writeString(callId);
}
 
Example 13
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(preset);
    dest.writeInt(presetId);
    dest.writeIntArray(colors);
    dest.writeByte((byte) (allowCustom ? 1 : 0));
    dest.writeInt(outline);
}
 
Example 14
Source Project: MultiType-FilePicker   File: ImageFile.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(getId());
    dest.writeString(getName());
    dest.writeString(getPath());
    dest.writeLong(getSize());
    dest.writeString(getBucketId());
    dest.writeString(getBucketName());
    dest.writeLong(getDate());
    dest.writeByte((byte) (isSelected() ? 1 : 0));
    dest.writeInt(orientation);
}
 
Example 15
Source Project: letv   File: AppInfo.java    License: Apache License 2.0 4 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.appName);
    dest.writeByte((byte) (this.isInlay ? 1 : 0));
    dest.writeInt(this.uiStyle);
}
 
Example 16
public void writeToParcel (Parcel parcel, int flags) {
    parcel.writeByte(fileType);
    parcel.writeByte(commSetting);
    parcel.writeInt(accessRights.length);
    parcel.writeByteArray(accessRights);
}
 
Example 17
Source Project: GithubApp   File: SearchResultResp.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.total_count);
    dest.writeByte(this.incomplete_results ? (byte) 1 : (byte) 0);
    dest.writeTypedList(this.items);
}
 
Example 18
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(id);
    parcel.writeString(fullName);
    parcel.writeString(subredditName);
    parcel.writeString(subredditNamePrefixed);
    parcel.writeString(subredditIconUrl);
    parcel.writeString(author);
    parcel.writeString(authorNamePrefixed);
    parcel.writeString(authorFlair);
    parcel.writeString(authorFlairHTML);
    parcel.writeString(authorIconUrl);
    parcel.writeString(postTime);
    parcel.writeLong(postTimeMillis);
    parcel.writeString(title);
    parcel.writeString(selfText);
    parcel.writeString(selfTextPlain);
    parcel.writeString(selfTextPlainTrimmed);
    parcel.writeString(previewUrl);
    parcel.writeString(thumbnailPreviewUrl);
    parcel.writeString(url);
    parcel.writeString(videoUrl);
    parcel.writeString(videoDownloadUrl);
    parcel.writeString(permalink);
    parcel.writeString(flair);
    parcel.writeString(awards);
    parcel.writeInt(nAwards);
    parcel.writeInt(score);
    parcel.writeInt(postType);
    parcel.writeInt(voteType);
    parcel.writeInt(previewWidth);
    parcel.writeInt(previewHeight);
    parcel.writeInt(nComments);
    parcel.writeByte((byte) (hidden ? 1 : 0));
    parcel.writeByte((byte) (spoiler ? 1 : 0));
    parcel.writeByte((byte) (nsfw ? 1 : 0));
    parcel.writeByte((byte) (stickied ? 1 : 0));
    parcel.writeByte((byte) (archived ? 1 : 0));
    parcel.writeByte((byte) (locked ? 1 : 0));
    parcel.writeByte((byte) (saved ? 1 : 0));
    parcel.writeByte((byte) (isCrosspost ? 1 : 0));
    parcel.writeString(crosspostParentId);
}
 
Example 19
Source Project: android-json-form-wizard   File: ViewState.java    License: MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte(mIsSavedInstance ? (byte) 1 : (byte) 0);
}
 
Example 20
private static void writeStringIfNotNull(Parcel parcel, String value) {
  parcel.writeByte((byte) (value != null ? 1 : 0));
  if (value != null) {
    parcel.writeString(value);
  }
}