List of usage examples for android.os Parcel createTypedArrayList
public final <T> ArrayList<T> createTypedArrayList(Parcelable.Creator<T> c)
From source file:com.cuddlesoft.norilib.SearchResult.java
/** * Re-create a SearchResult by deserializing data from a {@link android.os.Parcel}. * * @param parcel {@link android.os.Parcel} used to deserialize the SearchResult. *///from ww w .ja v a 2 s . co m protected SearchResult(Parcel parcel) { this.images = parcel.createTypedArrayList(Image.CREATOR); this.offset = parcel.readInt(); this.query = parcel.createTypedArray(Tag.CREATOR); this.hasNextPage = (parcel.readByte() == 0x01); }
From source file:com.github.capone.protocol.entities.Server.java
private Server(Parcel in) { name = in.readString();/* www. j a v a2s. co m*/ address = in.readString(); signatureKey = in.readParcelable(Identity.class.getClassLoader()); services = in.createTypedArrayList(Service.CREATOR); }
From source file:ch.berta.fabio.popularmovies.presentation.viewmodels.MovieGridViewModelOnlImpl.java
protected MovieGridViewModelOnlImpl(Parcel in) { super(in);/* w w w . j a v a 2 s. com*/ mMovies = in.createTypedArrayList(Movie.CREATOR); mMoviePage = in.readInt(); mRefreshing = in.readByte() != 0; mLoadingMore = in.readByte() != 0; mLoadingNewSort = in.readByte() != 0; mSortSelected = in.readParcelable(Sort.class.getClassLoader()); mMovieDbIdSelected = in.readInt(); }
From source file:edu.umich.flowfence.common.QMDetails.java
public void readFromParcel(Parcel source) { final int length = source.readInt(); final int endPos = source.dataPosition() + length; if (localLOGV) { Log.v(TAG, "Unparceling, length " + length); }//from ww w . j av a2 s. com if (source.dataPosition() < endPos) { descriptor = QMDescriptor.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Descriptor: " + descriptor); } } if (source.dataPosition() < endPos) { resultType = source.readString(); if (localLOGV) { Log.v(TAG, "Result type: " + resultType); } } if (source.dataPosition() < endPos) { paramInfo = source.createTypedArrayList(ParamInfo.CREATOR); if (paramInfo != null) { if (localLOGV) { Log.v(TAG, "Param info (size " + paramInfo.size() + "):"); for (ParamInfo pi : paramInfo) { Log.v(TAG, " " + pi); } } paramInfo = Collections.unmodifiableList(paramInfo); } else if (localLOGV) { Log.v(TAG, "Param info (null)"); } } if (source.dataPosition() < endPos) { requiredTaints = TaintSet.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Required taints: " + requiredTaints); } } if (source.dataPosition() < endPos) { optionalTaints = TaintSet.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Optional taints: " + optionalTaints); } } if (source.dataPosition() < endPos) { if (localLOGD) { Log.d(TAG, "Excess data at end of parcel"); } source.setDataPosition(endPos); } }
From source file:edu.umich.oasis.common.SodaDetails.java
public void readFromParcel(Parcel source) { final int length = source.readInt(); final int endPos = source.dataPosition() + length; if (localLOGV) { Log.v(TAG, "Unparceling, length " + length); }//from ww w . ja va 2s . c o m if (source.dataPosition() < endPos) { descriptor = SodaDescriptor.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Descriptor: " + descriptor); } } if (source.dataPosition() < endPos) { resultType = source.readString(); if (localLOGV) { Log.v(TAG, "Result type: " + resultType); } } if (source.dataPosition() < endPos) { paramInfo = source.createTypedArrayList(ParamInfo.CREATOR); if (paramInfo != null) { if (localLOGV) { Log.v(TAG, "Param info (size " + paramInfo.size() + "):"); for (ParamInfo pi : paramInfo) { Log.v(TAG, " " + pi); } } paramInfo = Collections.unmodifiableList(paramInfo); } else if (localLOGV) { Log.v(TAG, "Param info (null)"); } } if (source.dataPosition() < endPos) { requiredTaints = TaintSet.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Required taints: " + requiredTaints); } } if (source.dataPosition() < endPos) { optionalTaints = TaintSet.readFromParcel(source); if (localLOGV) { Log.v(TAG, "Optional taints: " + optionalTaints); } } if (source.dataPosition() < endPos) { if (localLOGD) { Log.d(TAG, "Excess data at end of parcel"); } source.setDataPosition(endPos); } }
From source file:it_minds.dk.eindberetningmobil_android.models.DrivingReport.java
protected DrivingReport(Parcel in) { this.Uuid = in.readString(); this.purpose = in.readString(); this.orgLocation = in.readString(); this.Rate = in.readString(); this.extraDescription = in.readString(); this.haveEditedDistance = in.readByte() != 0; this.startedAtHome = in.readByte() != 0; this.endedAtHome = in.readByte() != 0; this.fourKMRule = in.readByte() != 0; this.startTime = (DateTime) in.readSerializable(); this.endTime = (DateTime) in.readSerializable(); this.distanceInMeters = in.readDouble(); this.gpsPoints = in.createTypedArrayList(GPSCoordinateModel.CREATOR); this.homeToBorderDistance = in.readDouble(); }
From source file:com.frodo.github.bean.dto.response.Repo.java
protected Repo(Parcel in) { super(in);/*from w ww. j av a2 s . com*/ this.fork = in.readByte() != 0; this.isPrivate = in.readByte() != 0; long tmpCreated_at = in.readLong(); this.created_at = tmpCreated_at == -1 ? null : new Date(tmpCreated_at); long tmpPushed_at = in.readLong(); this.pushed_at = tmpPushed_at == -1 ? null : new Date(tmpPushed_at); long tmpUpdated_at = in.readLong(); this.updated_at = tmpUpdated_at == -1 ? null : new Date(tmpUpdated_at); this.forks_count = in.readInt(); this.id = in.readLong(); this.parent = in.readParcelable(Repo.class.getClassLoader()); this.source = in.readParcelable(Repo.class.getClassLoader()); this.clone_url = in.readString(); this.description = in.readString(); this.homepage = in.readString(); this.forks_url = in.readString(); this.git_url = in.readString(); this.contents_url = in.readString(); this.language = in.readString(); this.default_branch = in.readString(); this.mirror_url = in.readString(); this.name = in.readString(); this.full_name = in.readString(); this.ssh_url = in.readString(); this.svn_url = in.readString(); this.owner = in.readParcelable(User.class.getClassLoader()); this.stargazers_count = in.readInt(); this.subscribers_count = in.readInt(); this.network_count = in.readInt(); this.watchers_count = in.readInt(); this.size = in.readInt(); this.open_issues_count = in.readInt(); this.has_issues = in.readByte() != 0; this.has_downloads = in.readByte() != 0; this.has_wiki = in.readByte() != 0; this.permissions = in.readParcelable(Permissions.class.getClassLoader()); this.license = in.readParcelable(License.class.getClassLoader()); this.branches = in.createTypedArrayList(Branch.CREATOR); this.archive_url = in.readString(); }