@Override public Byte nullSafeFromParcel(Parcel parcel) { return parcel.readByte(); }
CompletedSnapshot(Parcel in) { super(in); this.reusedDownloadedFile = in.readByte() != 0; this.totalBytes = in.readLong(); }
CompletedSnapshot(Parcel in) { super(in); this.reusedDownloadedFile = in.readByte() != 0; this.totalBytes = in.readInt(); }
/** * Constructor called from {@link #CREATOR} */ SavedState(Parcel in) { super(in); position = in.readInt(); showDropdown = in.readByte() != 0; }
ConnectedMessageSnapshot(Parcel in) { super(in); this.resuming = in.readByte() != 0; this.totalBytes = in.readInt(); this.etag = in.readString(); this.fileName = in.readString(); }
@SuppressWarnings("WrongConstant") public SavedState(Parcel source, ClassLoader loader) { super(source); facing = source.readInt(); ratio = source.readParcelable(loader); autoFocus = source.readByte() != 0; flash = source.readInt(); }
ConnectedMessageSnapshot(Parcel in) { super(in); this.resuming = in.readByte() != 0; this.totalBytes = in.readLong(); this.etag = in.readString(); this.fileName = in.readString(); }
protected InstalledAppInfo(Parcel in) { this.packageName = in.readString(); this.apkPath = in.readString(); this.libPath = in.readString(); this.dependSystem = in.readByte() != 0; this.appId = in.readInt(); }
protected FileDownloadModel(Parcel in) { this.id = in.readInt(); this.url = in.readString(); this.path = in.readString(); this.pathAsDirectory = in.readByte() != 0; this.filename = in.readString(); this.status = new AtomicInteger(in.readByte()); this.soFar = new AtomicLong(in.readLong()); this.total = in.readLong(); this.errMsg = in.readString(); this.eTag = in.readString(); this.connectionCount = in.readInt(); this.isLargeFile = in.readByte() != 0; }
/* package */ ChapterTocFrame(Parcel in) { super(ID); this.elementId = castNonNull(in.readString()); this.isRoot = in.readByte() != 0; this.isOrdered = in.readByte() != 0; this.children = in.createStringArray(); int subFrameCount = in.readInt(); subFrames = new Id3Frame[subFrameCount]; for (int i = 0; i < subFrameCount; i++) { subFrames[i] = in.readParcelable(Id3Frame.class.getClassLoader()); } }
/* package */ SchemeData(Parcel in) { uuid = new UUID(in.readLong(), in.readLong()); licenseServerUrl = in.readString(); mimeType = in.readString(); data = in.createByteArray(); requiresSecureDecryption = in.readByte() != 0; }
/* package */ SelectionOverride(Parcel in) { groupIndex = in.readInt(); length = in.readByte(); tracks = new int[length]; in.readIntArray(tracks); }
ShareMessengerURLActionButton(final Parcel in) { super(in); this.url = in.readParcelable(Uri.class.getClassLoader()); this.isMessengerExtensionURL = (in.readByte() != 0); this.fallbackUrl = in.readParcelable(Uri.class.getClassLoader()); this.webviewHeightRatio = (WebviewHeightRatio) in.readSerializable(); this.shouldHideWebviewShareButton = (in.readByte() != 0); }
protected PackageSetting(Parcel in) { this.packageName = in.readString(); this.apkPath = in.readString(); this.libPath = in.readString(); this.dependSystem = in.readByte() != 0; this.appId = in.readInt(); //noinspection unchecked this.userState = in.readSparseArray(PackageUserState.class.getClassLoader()); this.skipDexOpt = in.readByte() != 0; }
protected IntentInfo(Parcel in) { this.filter = in.readParcelable(VPackage.class.getClassLoader()); this.hasDefault = in.readByte() != 0; this.labelRes = in.readInt(); this.nonLocalizedLabel = in.readString(); this.icon = in.readInt(); this.logo = in.readInt(); this.banner = in.readInt(); }
protected IssueFilter(Parcel in) { repository = in.readParcelable(Repository.class.getClassLoader()); labels = new ArrayList<>(); in.readList(labels, Label.class.getClassLoader()); milestone = in.readParcelable(Milestone.class.getClassLoader()); assignee = in.readParcelable(User.class.getClassLoader()); open = in.readByte() != 0; direction = in.readString(); sortType = in.readString(); }
@Test public void testReadWriteMultipleBytes() { for (byte i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; ++i) { parcel.writeByte(i); } parcel.setDataPosition(0); for (byte i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; ++i) { assertThat(parcel.readByte()).isEqualTo(i); } // now try to read past the number of items written and see what happens assertThat(parcel.readByte()).isEqualTo((byte) 0); }
@Test public void testReadWriteSingleByte() { byte val = 1; parcel.writeByte(val); parcel.setDataPosition(0); assertThat(parcel.readByte()).isEqualTo(val); }