Example usage for android.os Parcel readString

List of usage examples for android.os Parcel readString

Introduction

In this page you can find the example usage for android.os Parcel readString.

Prototype

public final String readString() 

Source Link

Document

Read a string value from the parcel at the current dataPosition().

Usage

From source file:com.nestlabs.sdk.Thermostat.java

private Thermostat(Parcel in) {
    super(in);/* www  .ja  va2 s  .c  o  m*/
    mCanCool = readBoolean(in);
    mCanHeat = readBoolean(in);
    mIsUsingEmergencyHeat = readBoolean(in);
    mHasFan = readBoolean(in);
    mFanTimerActive = readBoolean(in);
    mFanTimerTimeout = in.readString();
    mHasLeaf = readBoolean(in);
    mTemperatureScale = in.readString();
    mTargetTemperatureF = in.readLong();
    mTargetTemperatureC = in.readDouble();
    mTargetTemperatureHighF = in.readLong();
    mTargetTemperatureHighC = in.readDouble();
    mTargetTemperatureLowF = in.readLong();
    mTargetTemperatureLowC = in.readDouble();
    mAwayTemperatureHighF = in.readLong();
    mAwayTemperatureHighC = in.readDouble();
    mAwayTemperatureLowF = in.readLong();
    mAwayTemperatureLowC = in.readDouble();
    mHvacMode = in.readString();
    mAmbientTemperatureF = in.readLong();
    mAmbientTemperatureC = in.readDouble();
    mHumidity = in.readLong();
    mHvacState = in.readString();
    mIsLocked = readBoolean(in);
    mLockedTempMinF = in.readString();
    mLockedTempMaxF = in.readString();
    mLockedTempMinC = in.readString();
    mLockedTempMaxC = in.readString();
    mLabel = in.readString();
}

From source file:com.eTilbudsavis.etasdk.model.Catalog.java

private Catalog(Parcel in) {
    this.mErn = in.readString();
    this.mLabel = in.readString();
    this.mBackground = (Integer) in.readValue(Integer.class.getClassLoader());
    long tmpMRunFrom = in.readLong();
    this.mRunFrom = tmpMRunFrom == -1 ? null : new Date(tmpMRunFrom);
    long tmpMRunTill = in.readLong();
    this.mRunTill = tmpMRunTill == -1 ? null : new Date(tmpMRunTill);
    this.mPageCount = in.readInt();
    this.mOfferCount = in.readInt();
    this.mBranding = in.readParcelable(Branding.class.getClassLoader());
    this.mDealerId = in.readString();
    this.mDealerUrl = in.readString();
    this.mStoreId = in.readString();
    this.mStoreUrl = in.readString();
    this.mDimension = in.readParcelable(Dimension.class.getClassLoader());
    this.mImages = in.readParcelable(Images.class.getClassLoader());
    this.mCatrgoryIds = (HashSet<String>) in.readSerializable();
    this.mPdfUrl = in.readString();
    this.mPages = new ArrayList<Images>();
    in.readTypedList(mPages, Images.CREATOR);
    this.mDealer = in.readParcelable(Dealer.class.getClassLoader());
    this.mStore = in.readParcelable(Store.class.getClassLoader());
    this.mHotspots = in.readParcelable(HotspotMap.class.getClassLoader());
}

From source file:com.eTilbudsavis.etasdk.model.Offer.java

private Offer(Parcel in) {
    this.mErn = in.readString();
    this.mHeading = in.readString();
    this.mDescription = in.readString();
    this.mCatalogPage = in.readInt();
    this.mPricing = in.readParcelable(Pricing.class.getClassLoader());
    this.mQuantity = in.readParcelable(Quantity.class.getClassLoader());
    this.mImages = in.readParcelable(Images.class.getClassLoader());
    this.mLinks = in.readParcelable(Links.class.getClassLoader());
    long tmpMRunFrom = in.readLong();
    this.mRunFrom = tmpMRunFrom == -1 ? null : new Date(tmpMRunFrom);
    long tmpMRunTill = in.readLong();
    this.mRunTill = tmpMRunTill == -1 ? null : new Date(tmpMRunTill);
    this.mDealerUrl = in.readString();
    this.mDealerId = in.readString();
    this.mStoreUrl = in.readString();
    this.mStoreId = in.readString();
    this.mCatalogUrl = in.readString();
    this.mCatalogId = in.readString();
    this.mCatalog = in.readParcelable(Catalog.class.getClassLoader());
    this.mDealer = in.readParcelable(Dealer.class.getClassLoader());
    this.mStore = in.readParcelable(Store.class.getClassLoader());
}

From source file:de.azapps.mirakel.model.list.ListMirakel.java

private ListMirakel(Parcel in) {
    final int tmpSortBy = in.readInt();
    this.sortBy = SORT_BY.values()[tmpSortBy];
    this.createdAt = in.readString();
    this.updatedAt = in.readString();
    final int tmpSyncState = in.readInt();
    this.syncState = SYNC_STATE.values()[tmpSyncState];
    this.lft = in.readInt();
    this.rgt = in.readInt();
    this.color = in.readInt();
    this.accountID = in.readLong();
    this.isSpecial = in.readByte() != 0;
    this.setId(in.readLong());
    this.setName(in.readString());
}

From source file:com.jefftharris.passwdsafe.file.PasswdFileUri.java

/** Constructor from parcelable data */
private PasswdFileUri(Parcel source) {
    String str;/*ww  w  .jav a  2 s  . c  o m*/
    itsUri = source.readParcelable(getClass().getClassLoader());
    itsType = Type.valueOf(source.readString());
    str = source.readString();
    //noinspection ConstantConditions
    itsFile = (str != null) ? new File(str) : null;
    itsTitle = source.readString();
    str = source.readString();
    //noinspection ConstantConditions
    itsSyncType = (str != null) ? ProviderType.valueOf(str) : null;
}

From source file:org.droid2droid.internal.AbstractRemoteAndroidImpl.java

protected final void updateData(Parcel data) // TODO: a placer plutot cot serveur
{
    if (UPDATE_PARCEL) {
        int v = VERSION.SDK_INT;
        data.setDataPosition(0);//www . j  a  v a  2 s.  c  o m
        if (v >= 10) // Gingerbread_MR1+
        {
            data.readInt();
        }
        String enforceInterfaceName = data.readString(); // Read the interface name (see Parcel.cpp)
        assert (enforceInterfaceName != null);
        byte[] bufDatas = data.marshall(); // Return all the buffer (with the specific enforceInterface
        int startDatas = data.dataPosition(); // Position after the first string

        // Create a new one with interface name + buffers
        Parcel p = Parcel.obtain();
        p.setDataPosition(0);
        p.writeString(enforceInterfaceName);
        int sizeInterface = p.dataPosition();
        byte[] bufInterface = p.marshall(); // Part of buffer only for the string
        p.recycle();

        // Extract the rest of the buffer
        byte[] result = new byte[sizeInterface + bufDatas.length - startDatas];
        System.arraycopy(bufInterface, 0, result, 0, sizeInterface);
        System.arraycopy(bufDatas, startDatas, result, sizeInterface, bufDatas.length - startDatas);
        data.unmarshall(result, 0, result.length);
    }
}

From source file:fiskinfoo.no.sintef.fiskinfoo.Baseclasses.ToolEntry.java

protected ToolEntry(Parcel in) {
    id = in.readString();
    coordinates = new ArrayList<>();
    in.readList(coordinates, Point.class.getClassLoader());
    geometry = GeometryType.createFromValue(in.readString());
    IMO = in.readString();/*  w ww .jav  a  2  s .  c om*/
    IRCS = in.readString();
    MMSI = in.readString();
    RegNum = in.readString();
    VesselName = in.readString();
    VesselPhone = in.readString();
    VesselEmail = in.readString();
    ContactPersonEmail = in.readString();
    ContactPersonPhone = in.readString();
    ContactPersonName = in.readString();
    ToolTypeCode = ToolType.createFromValue(in.readString());
    Source = in.readString();
    Comment = in.readString();
    ShortComment = in.readString();
    RemovedTime = in.readString();
    SetupDateTime = in.readString();
    ToolId = in.readString();
    LastChangedDateTime = in.readString();
    LastChangedBySource = in.readString();
    toolStatus = ToolEntryStatus.createFromValue(in.readString());
    toolLogId = in.readInt();
}

From source file:com.vk.sdk.api.model.VKApiCommunityFull.java

public VKApiCommunityFull(Parcel in) {
    super(in);/*from w  w w .  ja  va 2s  .  co  m*/
    this.city = in.readParcelable(VKApiCity.class.getClassLoader());
    this.country = in.readParcelable(VKApiCountry.class.getClassLoader());
    this.status_audio = in.readParcelable(VKApiAudio.class.getClassLoader());
    this.place = in.readParcelable(VKApiPlace.class.getClassLoader());
    this.description = in.readString();
    this.wiki_page = in.readString();
    this.members_count = in.readInt();
    this.counters = in.readParcelable(Counters.class.getClassLoader());
    this.start_date = in.readLong();
    this.end_date = in.readLong();
    this.can_post = in.readByte() != 0;
    this.can_see_all_posts = in.readByte() != 0;
    this.status = in.readString();
    this.contacts = in.readParcelable(VKList.class.getClassLoader());
    this.links = in.readParcelable(VKList.class.getClassLoader());
    this.fixed_post = in.readInt();
    this.verified = in.readByte() != 0;
    this.site = in.readString();
    this.blacklisted = in.readByte() != 0;
}

From source file:de.mrapp.android.preference.activity.PreferenceHeader.java

/**
 * Creates a new navigation item, which categorizes multiple preferences.
 *
 * @param source//w  ww  .  j  a  v  a 2  s  .  c  o m
 *         The parcel, the navigation item should be created from, as an instance of the class
 *         {@link Parcel}. The parcel may not be null
 */
@SuppressWarnings("deprecation")
private PreferenceHeader(@NonNull final Parcel source) {
    setTitle(TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source));
    setSummary(TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source));
    setBreadCrumbTitle(TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source));
    setBreadCrumbShortTitle(TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source));
    setIcon(new BitmapDrawable((Bitmap) source.readParcelable(Bitmap.class.getClassLoader())));
    setFragment(source.readString());
    setExtras(source.readBundle(getClass().getClassLoader()));

    if (source.readInt() != 0) {
        setIntent(Intent.CREATOR.createFromParcel(source));
    }
}

From source file:com.vk.sdkweb.api.model.VKApiUserFull.java

public VKApiUserFull(Parcel in) {
    super(in);//from w  w w.j  av a 2 s.c  o  m
    this.activity = in.readString();
    this.status_audio = in.readParcelable(VKApiAudio.class.getClassLoader());
    this.bdate = in.readString();
    this.city = in.readParcelable(VKApiCity.class.getClassLoader());
    this.country = in.readParcelable(VKApiCountry.class.getClassLoader());
    this.last_seen = in.readLong();
    this.universities = in.readParcelable(VKList.class.getClassLoader());
    this.schools = in.readParcelable(VKList.class.getClassLoader());
    this.smoking = in.readInt();
    this.alcohol = in.readInt();
    this.political = in.readInt();
    this.life_main = in.readInt();
    this.people_main = in.readInt();
    this.inspired_by = in.readString();
    this.langs = in.createStringArray();
    this.religion = in.readString();
    this.facebook = in.readString();
    this.facebook_name = in.readString();
    this.livejournal = in.readString();
    this.skype = in.readString();
    this.site = in.readString();
    this.twitter = in.readString();
    this.instagram = in.readString();
    this.mobile_phone = in.readString();
    this.home_phone = in.readString();
    this.screen_name = in.readString();
    this.activities = in.readString();
    this.interests = in.readString();
    this.movies = in.readString();
    this.tv = in.readString();
    this.books = in.readString();
    this.games = in.readString();
    this.about = in.readString();
    this.quotes = in.readString();
    this.can_post = in.readByte() != 0;
    this.can_see_all_posts = in.readByte() != 0;
    this.can_write_private_message = in.readByte() != 0;
    this.wall_comments = in.readByte() != 0;
    this.is_banned = in.readByte() != 0;
    this.is_deleted = in.readByte() != 0;
    this.wall_default_owner = in.readByte() != 0;
    this.verified = in.readByte() != 0;
    this.sex = in.readInt();
    this.counters = in.readParcelable(Counters.class.getClassLoader());
    this.relation = in.readInt();
    this.relatives = in.readParcelable(VKList.class.getClassLoader());
    this.blacklisted_by_me = in.readByte() != 0;
}