List of usage examples for android.os Parcel readLong
public final long readLong()
From source file:app.com.example.android.sunshine.ItemChoiceManager.java
public void onRestoreInstanceState(Bundle savedInstanceState) { byte[] states = savedInstanceState.getByteArray(SELECTED_ITEMS_KEY); if (null != states) { Parcel inParcel = Parcel.obtain(); inParcel.unmarshall(states, 0, states.length); inParcel.setDataPosition(0);// ww w .j a va 2 s . c o m mCheckStates = inParcel.readSparseBooleanArray(); final int numStates = inParcel.readInt(); mCheckedIdStates.clear(); for (int i = 0; i < numStates; i++) { final long key = inParcel.readLong(); final int value = inParcel.readInt(); mCheckedIdStates.put(key, value); } } }
From source file:com.fanfou.app.opensource.api.bean.Status.java
public Status(final Parcel in) { this.id = in.readString(); this.ownerId = in.readString(); this.createdAt = new Date(in.readLong()); this.type = in.readInt(); this.text = in.readString(); this.simpleText = in.readString(); this.source = in.readString(); this.inReplyToStatusId = in.readString(); this.inReplyToUserId = in.readString(); this.inReplyToScreenName = in.readString(); this.photoImageUrl = in.readString(); this.photoLargeUrl = in.readString(); this.photoThumbUrl = in.readString(); this.userId = in.readString(); this.userScreenName = in.readString(); this.userProfileImageUrl = in.readString(); this.truncated = in.readInt() == 0 ? false : true; this.favorited = in.readInt() == 0 ? false : true; this.self = in.readInt() == 0 ? false : true; this.isRead = in.readInt() == 0 ? false : true; this.isThread = in.readInt() == 0 ? false : true; this.hasPhoto = in.readInt() == 0 ? false : true; this.special = in.readInt() == 0 ? false : true; }
From source file:com.baasbox.android.BaasLink.java
private BaasLink(Parcel parcel) { id = Util.readOptString(parcel); label = Util.readOptString(parcel); author = Util.readOptString(parcel); creationDate = Util.readOptString(parcel); version = parcel.readLong(); source = readObject(parcel);//from w ww . j av a2s .c om destination = readObject(parcel); }
From source file:com.kevinquan.android.location.SimpleRecordedLocation.java
public SimpleRecordedLocation(Parcel in) { this();/*from ww w . j a va 2 s . com*/ mLatitude = in.readDouble(); mLongitude = in.readDouble(); mAccuracy = in.readFloat(); mAltitude = in.readDouble(); mBearing = in.readFloat(); mSpeed = in.readFloat(); mRecordedAt = in.readLong(); mProvider = LocationProviderType.fromValue(in.readString()); }
From source file:org.immopoly.android.model.Flat.java
public Flat(Parcel in) { uid = in.readInt();/*from w ww .ja va 2 s . com*/ name = in.readString(); description = in.readString(); city = in.readString(); titlePictureSmall = in.readString(); priceValue = in.readString(); currency = in.readString(); priceIntervaleType = in.readString(); lat = in.readDouble(); lng = in.readDouble(); creationDate = in.readLong(); long ageMs = System.currentTimeMillis() - creationDate; age = ageMs < Const.EXPOSE_THRESHOLD_NEW ? AGE_NEW : ageMs < Const.EXPOSE_THRESHOLD_OLD ? AGE_NORMAL : AGE_OLD; }
From source file:io.github.hidroh.materialistic.data.HackerNewsItem.java
@Synthetic HackerNewsItem(Parcel source) { id = source.readLong(); title = source.readString();//from ww w. ja v a2s .c o m time = source.readLong(); by = source.readString(); kids = source.createLongArray(); url = source.readString(); text = source.readString(); type = source.readString(); favorite = source.readInt() != 0; descendants = source.readInt(); score = source.readInt(); favorite = source.readInt() == 1; viewed = source.readInt() == 1; localRevision = source.readInt(); level = source.readInt(); dead = source.readInt() == 1; deleted = source.readInt() == 1; collapsed = source.readInt() == 1; contentExpanded = source.readInt() == 1; rank = source.readInt(); lastKidCount = source.readInt(); hasNewDescendants = source.readInt() == 1; parent = source.readLong(); voted = source.readInt() == 1; pendingVoted = source.readInt() == 1; next = source.readLong(); previous = source.readLong(); }
From source file:com.android.emailcommon.provider.HostAuth.java
/** * Supports Parcelable//w w w .j a va2s .c o m */ public HostAuth(Parcel in) { mBaseUri = CONTENT_URI; mId = in.readLong(); mProtocol = in.readString(); mAddress = in.readString(); mPort = in.readInt(); mFlags = in.readInt(); mLogin = in.readString(); mPassword = in.readString(); mDomain = in.readString(); mClientCertAlias = in.readString(); if ((mFlags & FLAG_OAUTH) != 0) { // TODO: This is nasty, but to be compatible with backward Exchange, we can't make any // change to the parcelable format. But we need Credential objects to be here. // So... only parcel or unparcel Credentials if the OAUTH flag is set. This will never // be set on HostAuth going to or coming from Exchange. mCredentialKey = in.readLong(); mCredential = new Credential(in); if (mCredential.equals(Credential.EMPTY)) { mCredential = null; } } else { mCredentialKey = -1; } }
From source file:com.ksk.droidbatterybooster.provider.TimeSchedule.java
public TimeSchedule(Parcel p) { id = p.readLong(); enabled = p.readInt() == 1;//from ww w.j av a 2s .c om hour = p.readInt(); minutes = p.readInt(); daysOfWeek = new DaysOfWeek(p.readInt()); time = p.readLong(); modeId = p.readInt(); }
From source file:com.wellsandwhistles.android.redditsp.reddit.things.RedditSubreddit.java
public RedditSubreddit(final Parcel parcel) { header_img = parcel.readString();//from w ww . j a va 2s. c om header_title = parcel.readString(); description = parcel.readString(); description_html = parcel.readString(); public_description = parcel.readString(); id = parcel.readString(); name = parcel.readString(); title = parcel.readString(); display_name = parcel.readString(); url = parcel.readString(); created = parcel.readLong(); created_utc = parcel.readLong(); accounts_active = parcel.readInt(); subscribers = parcel.readInt(); if (accounts_active < 0) accounts_active = null; if (subscribers < 0) subscribers = null; over18 = parcel.readInt() == 1; }
From source file:com.vk.sdk.api.model.VKApiVideo.java
/** * Creates a Video instance from Parcel. *///from w w w . ja v a2 s. c o m public VKApiVideo(Parcel in) { this.id = in.readInt(); this.owner_id = in.readInt(); this.album_id = in.readInt(); this.title = in.readString(); this.description = in.readString(); this.duration = in.readInt(); this.link = in.readString(); this.date = in.readLong(); this.views = in.readInt(); this.player = in.readString(); this.photo_130 = in.readString(); this.photo_320 = in.readString(); this.photo_640 = in.readString(); this.photo = in.readParcelable(VKPhotoSizes.class.getClassLoader()); this.access_key = in.readString(); this.comments = in.readInt(); this.can_comment = in.readByte() != 0; this.can_repost = in.readByte() != 0; this.user_likes = in.readByte() != 0; this.repeat = in.readByte() != 0; this.likes = in.readInt(); this.privacy_view = in.readInt(); this.privacy_comment = in.readInt(); this.mp4_240 = in.readString(); this.mp4_360 = in.readString(); this.mp4_480 = in.readString(); this.mp4_720 = in.readString(); this.external = in.readString(); }