public LoginClient(Parcel source) { Object [] o = source.readParcelableArray(LoginMethodHandler.class.getClassLoader()); handlersToTry = new LoginMethodHandler[o.length]; for (int i = 0; i < o.length; ++i) { handlersToTry[i] = (LoginMethodHandler) o[i]; handlersToTry[i].setLoginClient(this); } currentHandler = source.readInt(); pendingRequest = source.readParcelable(Request.class.getClassLoader()); loggingExtras = Utility.readStringMapFromParcel(source); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(this.id); dest.writeString(this.url); dest.writeInt(this.total_count); dest.writeInt(this.plusOne); dest.writeInt(this.minusOne); dest.writeInt(this.laugh); dest.writeInt(this.hooray); dest.writeInt(this.confused); dest.writeInt(this.heart); dest.writeString(this.content); dest.writeParcelable(this.user, flags); dest.writeByte(this.viewerHasReacted ? (byte) 1 : (byte) 0); dest.writeByte(this.isCallingApi ? (byte) 1 : (byte) 0); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.iD); dest.writeString(this.name); dest.writeValue(this.packageBaseID); dest.writeString(this.packageBase); dest.writeString(this.version); dest.writeString(this.description); dest.writeString(this.uRL); dest.writeValue(this.numVotes); dest.writeValue(this.popularity); dest.writeString(this.outOfDate); dest.writeString(this.maintainer); dest.writeValue(this.firstSubmitted); dest.writeValue(this.lastModified); dest.writeString(this.uRLPath); dest.writeStringList(this.depends); dest.writeStringList(this.makeDepends); dest.writeStringList(this.optDepends); dest.writeStringList(this.conflicts); dest.writeStringList(this.provides); dest.writeStringList(this.license); dest.writeStringList(this.keywords); }
@Test public void testVoterParcelMale() { Voter voter = new Voter(firstName, lastName, Gender.MALE); Parcel parcel = Parcel.obtain(); voter.writeToParcel(parcel, 0); // After you're done with writing, you need to reset the parcel for reading: parcel.setDataPosition(0); // Reconstruct object from parcel and asserts: Voter createdFromParcel = Voter.CREATOR.createFromParcel(parcel); assertEquals(voter.getFirstName(), createdFromParcel.getFirstName()); assertEquals(voter.getLastName(), createdFromParcel.getLastName()); assertEquals(voter.getGender(), createdFromParcel.getGender()); }
public static Map<Integer, String> readIntStringMap(Parcel in){ boolean isNull = in.readByte() == (byte) 1; if(isNull){ return null; } int size = in.readInt(); Map<Integer, String> map = new HashMap<>(size); for(int i = 0; i < size; i++){ Integer key = readObjectInteger(in); String value = in.readString(); map.put(key, value); } return map; }
@SuppressWarnings({ "unchecked" }) public List createFromParcel(Parcel in) { List instance = new List(); instance.dt = ((int) in.readValue((int.class.getClassLoader()))); instance.temp = ((Temp) in.readValue((Temp.class.getClassLoader()))); instance.pressure = ((double) in.readValue((double.class.getClassLoader()))); instance.humidity = ((int) in.readValue((int.class.getClassLoader()))); in.readList(instance.weather, (Weather.class.getClassLoader())); instance.speed = ((double) in.readValue((double.class.getClassLoader()))); instance.deg = ((int) in.readValue((int.class.getClassLoader()))); instance.clouds = ((int) in.readValue((int.class.getClassLoader()))); instance.rain = ((double) in.readValue((double.class.getClassLoader()))); return instance; }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(id); dest.writeString(mimeType); dest.writeParcelable(uri, 0); dest.writeLong(size); dest.writeLong(duration); }
@Override public AlbumItem createFromParcel(Parcel parcel) { switch (parcel.readInt()) { case VIDEO: return new Video(parcel); case GIF: return new Gif(parcel); case RAW: return new RAWImage(parcel); default: return new Photo(parcel); } }
/** * 检查所有的服务是否已经就位(已经添加到{@link ServiceManagerThread}) * @return */ private boolean isReadyRemote(){ Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { mRemoteServiceManager.transact(ServiceContext.READY_REMOTE, data, reply, 0); int result = reply.readInt(); if(result == ServiceContext.SUCCESS) { log("remote service manager ready"); return true; } log("remote service manager not ready"); return false; } catch (RemoteException e) { e.printStackTrace(); log("getService exception"); return false; } finally { data.recycle(); reply.recycle(); } }
protected DataBean(Parcel in) { this.roomStatus = in.readInt(); this.liveStatus = in.readInt(); this.url = in.readString(); this.title = in.readString(); this.cover = in.readString(); this.online = in.readInt(); this.roomid = in.readInt(); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.key); dest.writeString(this.value); dest.writeString(this.oldValue); dest.writeInt(this.selectionStart); dest.writeInt(this.selectionEnd); dest.writeByte(this.isFoucused ? (byte) 1 : (byte) 0); }
/** * Called from {@link #CREATOR} to create an instance of SavedState form the given parcel * <var>source</var>. * * @param source Parcel with data for the new instance. */ protected SavedState(@NonNull Parcel source) { super(source); this.dateVisible = source.readLong(); this.dateSelected = (Long) source.readValue(Long.class.getClassLoader()); this.selectedDayMonthPosition = source.readInt(); this.locale = (Locale) source.readSerializable(); this.adapterState = source.readParcelable(UiConfig.class.getClassLoader()); }
private void readFromParcel(Parcel in) { if (in.readInt() == 1) { mDevice = BluetoothLeDevice.CREATOR.createFromParcel(in); } if (in.readInt() == 1) { mScanRecord = ScanRecordCompat.parseFromBytes(in.createByteArray()); } mRssi = in.readInt(); mTimestampNanos = in.readLong(); }
@Override public void writeToParcel(Parcel parcel, int i) { parcel.writeString(id); parcel.writeString(name); parcel.writeString(description); parcel.writeString(status.name()); parcel.writeLong(publishedAt != null ? publishedAt.getTime() : -1L); parcel.writeInt(enabledCount); parcel.writeLong(lastRunAt != null ? lastRunAt.getTime() : -1L); parcel.writeString(url); parcel.writeString(embeddedUrl); parcel.writeTypedList(services); }
private WheelSavedState(Parcel in) { super(in); this.mProgress = in.readFloat(); this.mTargetProgress = in.readFloat(); this.isSpinning = in.readByte() != 0; this.spinSpeed = in.readFloat(); this.barWidth = in.readInt(); this.barColor = in.readInt(); this.rimWidth = in.readInt(); this.rimColor = in.readInt(); this.circleRadius = in.readInt(); this.linearProgress = in.readByte() != 0; this.fillRadius = in.readByte() != 0; }
@Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeString(mSerializedPattern); dest.writeInt(mDisplayMode); dest.writeValue(mInputEnabled); dest.writeValue(mInStealthMode); dest.writeValue(mTactileFeedbackEnabled); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.mode); dest.writeParcelable(this.cell, flags); dest.writeTypedList(this.allCell); dest.writeTypedList(this.neighboringCell); dest.writeParcelable(this.location, flags); }
protected InfoBean(Parcel in) { this.followUserCount = in.readString(); this.topicDescription = in.readString(); this.listImg = in.readString(); this.topicId = in.readString(); this.topicName = in.readString(); }
public BookCategory(Parcel in) { this.id = in.readInt(); this.order = in.readInt(); this.name = in.readString(); this.numberOfBooks = in.readInt(); this.hasDownloadedBooks = in.readByte() != 0; }
@Override public void writeToParcel(Parcel parcel, int i) { parcel.writeInt(appId); parcel.writeString(name); parcel.writeString(iconUrl); parcel.writeFloat(hoursPlayed); parcel.writeInt(dropsRemaining); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.id); dest.writeString(this.cdate); dest.writeValue(this.amount); dest.writeValue(this.userId); dest.writeValue(this.itemId); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.id); dest.writeString(this.author); dest.writeString(this.title); dest.writeString(this.strains); dest.writeString(this.paragraphs); dest.writeString(this.pyquany); dest.writeString(this.pyjian); dest.writeString(this.authorjt); dest.writeString(this.pyquan); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(this.mDestination, flags); dest.writeFloat(this.mAspectRatioX); dest.writeFloat(this.mAspectRatioY); dest.writeInt(this.mMaxWidth); dest.writeInt(this.mMaxHeight); }
private State(Parcel in) { int[] ordinals = new int[2]; in.readIntArray(ordinals); in.readLongArray(startTimes); this.transitionStartTime = in.readLong(); int i = 0; for (int ordinal : ordinals) { taggingStates[i++] = FunkyView.State.values()[ordinal]; } }
protected BeerProductItem( Parcel in ){ super( in ); this.id = in.readString(); this.alcohol = in.readString(); this.image = in.readString(); this.name = in.readString(); this.price = in.readInt(); this.volume = in.readString(); this.amount = in.readInt(); this.isAdded = in.readByte() != 0; }
@SuppressWarnings({ "unchecked" }) public ProductionCompany createFromParcel(Parcel in) { ProductionCompany instance = new ProductionCompany(); instance.name = ((String) in.readValue((String.class.getClassLoader()))); instance.id = ((Integer) in.readValue((Integer.class.getClassLoader()))); return instance; }
protected Urls(Parcel in) { raw = in.readString(); full = in.readString(); regular = in.readString(); small = in.readString(); thumb = in.readString(); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(mTaskHasBeenExist); dest.writeString(mTips); dest.writeString(mHoneycomblow); dest.writeString(mDownLoad); dest.writeString(mCancel); dest.writeString(mDownLoadFail); dest.writeString(mLoading); dest.writeString(mTrickter); dest.writeString(mFileDownLoad); dest.writeString(mClickOpen); }
public void registerDeviceCallback(String deviceId, DeviceCallback callback, int events) throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); try { _data.writeInterfaceToken(Stub.DESCRIPTOR); _data.writeString(deviceId); _data.writeStrongBinder(callback != null ? callback.asBinder() : null); _data.writeInt(events); this.mRemote.transact(5, _data, _reply, 0); ExceptionUtils.readExceptionFromParcel(_reply); } finally { _reply.recycle(); _data.recycle(); } }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.type); dest.writeParcelable(this.issue, flags); dest.writeParcelable(this.pullRequest, flags); dest.writeParcelable(this.commit, flags); dest.writeParcelable(this.repository, flags); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(id); dest.writeString(title); dest.writeString(description); dest.writeString(published_at); dest.writeByte((byte) (curated ? 1 : 0)); dest.writeInt(total_photos); dest.writeByte((byte) (privateX ? 1 : 0)); dest.writeString(share_key); dest.writeParcelable(cover_photo, flags); dest.writeParcelable(user, flags); dest.writeParcelable(links, flags); dest.writeTypedList(tags); }
public PointOfInterest createFromParcel(Parcel source) { return new PointOfInterest(source); }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(name); }
protected SpecialResponse(Parcel in) { res = in.readParcelable(Res.class.getClassLoader()); data = in.readString(); }
protected TrendingLanguage(Parcel in) { this.name = in.readString(); this.slug = in.readString(); this.order = in.readInt(); this.selected = in.readByte() != 0; }
@Override public StatBean createFromParcel(Parcel source) { return new StatBean(source); }
@Override public CustomLocation createFromParcel(Parcel source) { return new CustomLocation(source); }
@Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeInt(this.retryingTimes); }
protected Attachment(final Parcel in) { file = new File(in.readString()); type = Type.values()[in.readInt()]; }
public QuadrantItem createFromParcel(Parcel in) { return new QuadrantItem(in); }