Java Code Examples for android.os.Parcel#readHashMap()

The following examples show how to use android.os.Parcel#readHashMap() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Presence.java    From Zom-Android-XMPP with GNU General Public License v3.0 6 votes vote down vote up
public Presence(Parcel source) {
    mStatus = source.readInt();
    mStatusText = source.readString();
    mAvatarData = source.createByteArray();
    mAvatarType = source.readString();
    mClientType = source.readInt();
    // TODO - what ClassLoader should be passed to readMap?
    // TODO - switch to Bundle
    mExtendedInfo = source.readHashMap(null);

    //this may not exist for older persisted presence data
    if (source.dataAvail() > 0)
        mResource = source.readString();

    if (source.dataAvail() > 0) {
        long timeLastSeen = source.readLong();
        if (timeLastSeen != -1)
            mLastSeen = new Date(timeLastSeen);
    }
}
 
Example 2
Source File: TrackSimple.java    From spotify-web-api-android with MIT License 6 votes vote down vote up
protected TrackSimple(Parcel in) {
    this.artists = in.createTypedArrayList(ArtistSimple.CREATOR);
    this.available_markets = in.createStringArrayList();
    this.is_playable = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.linked_from = in.readParcelable(LinkedTrack.class.getClassLoader());
    this.disc_number = in.readInt();
    this.duration_ms = in.readLong();
    this.explicit = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.external_urls = in.readHashMap(Map.class.getClassLoader());
    this.href = in.readString();
    this.id = in.readString();
    this.name = in.readString();
    this.preview_url = in.readString();
    this.track_number = in.readInt();
    this.type = in.readString();
    this.uri = in.readString();
}
 
Example 3
Source File: Token.java    From alpha-wallet-android with MIT License 6 votes vote down vote up
protected Token(Parcel in) {
    tokenInfo = in.readParcelable(TokenInfo.class.getClassLoader());
    balance = new BigDecimal(in.readString());
    updateBlancaTime = in.readLong();
    int readType = in.readInt();
    shortNetworkName = in.readString();
    pendingBalance = new BigDecimal(in.readString());
    tokenWallet = in.readString();
    lastBlockCheck = in.readLong();
    lastTxCheck = in.readLong();
    lastTxUpdate = in.readLong();
    lastTxTime = in.readLong();
    hasTokenScript = in.readByte() == 1;
    nameWeight = in.readInt();
    ticker = in.readParcelable(TokenTicker.class.getClassLoader());
    functionAvailabilityMap = in.readHashMap(List.class.getClassLoader());

    balanceChanged = false;
    if (readType <= ContractType.CREATION.ordinal())
    {
        contractType = ContractType.values()[readType];
    }
}
 
Example 4
Source File: RemoteCC.java    From CC with Apache License 2.0 5 votes vote down vote up
protected RemoteCC(Parcel in) {
    componentName = in.readString();
    actionName = in.readString();
    callId = in.readString();
    isMainThreadSyncCall = in.readByte() != 0;
    params = in.readHashMap(getClass().getClassLoader());
}
 
Example 5
Source File: PlaylistBase.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
protected PlaylistBase(Parcel in) {
    this.collaborative = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.external_urls = in.readHashMap(Map.class.getClassLoader());
    this.href = (String) in.readValue(String.class.getClassLoader());
    this.id = (String) in.readValue(String.class.getClassLoader());
    this.images = in.createTypedArrayList(Image.CREATOR);
    this.name = (String) in.readValue(String.class.getClassLoader());
    this.owner = in.readParcelable(UserPublic.class.getClassLoader());
    this.is_public = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.snapshot_id = (String) in.readValue(String.class.getClassLoader());
    this.type = (String) in.readValue(String.class.getClassLoader());
    this.uri = (String) in.readValue(String.class.getClassLoader());
}
 
Example 6
Source File: ArtistSimple.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
protected ArtistSimple(Parcel in) {
    this.external_urls = in.readHashMap(Map.class.getClassLoader());
    this.href = in.readString();
    this.id = in.readString();
    this.name = in.readString();
    this.type = in.readString();
    this.uri = in.readString();
}
 
Example 7
Source File: CongratsResponse.java    From px-android with MIT License 5 votes vote down vote up
PXBusinessTouchpoint(final Parcel in) {
    id = in.readString();
    type = in.readString();
    content = in.readHashMap(HashMap.class.getClassLoader());
    tracking = in.readHashMap(HashMap.class.getClassLoader());
    additionalEdgeInsets = in.readParcelable(AdditionalEdgeInsets.class.getClassLoader());
}
 
Example 8
Source File: AlbumSimple.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
protected AlbumSimple(Parcel in) {
    this.album_type = in.readString();
    this.available_markets = in.createStringArrayList();
    this.external_urls = in.readHashMap(ClassLoader.getSystemClassLoader());
    this.href = in.readString();
    this.id = in.readString();
    this.images = in.createTypedArrayList(Image.CREATOR);
    this.name = in.readString();
    this.type = in.readString();
    this.uri = in.readString();
}
 
Example 9
Source File: LinkedTrack.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
protected LinkedTrack(Parcel in) {
    this.external_urls = in.readHashMap(ClassLoader.getSystemClassLoader());
    this.href = in.readString();
    this.id = in.readString();
    this.type = in.readString();
    this.uri = in.readString();
}
 
Example 10
Source File: FullTrigger.java    From hawkular-android-client with Apache License 2.0 5 votes vote down vote up
protected FullTrigger(Parcel parcel) {
    this.id = parcel.readString();
    this.description = parcel.readString();
    this.tags = parcel.readHashMap(String.class.getClassLoader());
    this.type = parcel.readString();
    this.eventType = parcel.readString();
    this.autoEnable = Boolean.getBoolean(parcel.readString());
    this.autoDisable = Boolean.getBoolean(parcel.readString());
    this.enabled = parcel.readString().equals("true");
    this.severity = parcel.readString();
}
 
Example 11
Source File: Album.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
protected Album(Parcel in) {
    super(in);
    this.artists = in.createTypedArrayList(ArtistSimple.CREATOR);
    this.copyrights = in.createTypedArrayList(Copyright.CREATOR);
    this.external_ids = in.readHashMap(ClassLoader.getSystemClassLoader());
    this.genres = in.createStringArrayList();
    this.popularity = (Integer) in.readValue(Integer.class.getClassLoader());
    this.release_date = in.readString();
    this.release_date_precision = in.readString();
    this.tracks = in.readParcelable(Pager.class.getClassLoader());
}
 
Example 12
Source File: Trigger.java    From hawkular-android-client with Apache License 2.0 4 votes vote down vote up
protected Trigger(Parcel parcel) {
    this.id = parcel.readString();
    this.description = parcel.readString();
    this.tags = parcel.readHashMap(String.class.getClassLoader());
    this.enabled = parcel.readString().equals("true");
}
 
Example 13
Source File: OperationMethod.java    From SoloPi with Apache License 2.0 4 votes vote down vote up
private OperationMethod(Parcel in) {
    actionEnum = PerformActionEnum.getActionEnumByCode(in.readString());
    operationParam = in.readHashMap(ClassLoader.getSystemClassLoader());
    encrypt = in.readInt() == 1;
}
 
Example 14
Source File: Track.java    From spotify-web-api-android with MIT License 4 votes vote down vote up
protected Track(Parcel in) {
    super(in);
    this.album = in.readParcelable(AlbumSimple.class.getClassLoader());
    this.external_ids = in.readHashMap(Map.class.getClassLoader());
    this.popularity = (Integer) in.readValue(Integer.class.getClassLoader());
}
 
Example 15
Source File: FileDownloadHeader.java    From FileDownloader with Apache License 2.0 4 votes vote down vote up
protected FileDownloadHeader(Parcel in) {
    //noinspection unchecked
    this.mHeaderMap = in.readHashMap(String.class.getClassLoader());
}
 
Example 16
Source File: ContentValues.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings({"deprecation", "unchecked"})
public ContentValues createFromParcel(Parcel in) {
    // TODO - what ClassLoader should be passed to readHashMap?
    HashMap<String, Object> values = in.readHashMap(null);
    return new ContentValues(values);
}
 
Example 17
Source File: RemoteCCResult.java    From CC with Apache License 2.0 4 votes vote down vote up
private RemoteCCResult(Parcel in) {
    success = in.readByte() != 0;
    errorMessage = in.readString();
    code = in.readInt();
    data = in.readHashMap(getClass().getClassLoader());
}
 
Example 18
Source File: RemoteParamUtil.java    From CC with Apache License 2.0 4 votes vote down vote up
MapParam(Parcel in) {
    super(in);
    params = in.readHashMap(getClass().getClassLoader());
}
 
Example 19
Source File: PersistableBundle.java    From JobSchedulerCompat with MIT License 4 votes vote down vote up
@SuppressWarnings("unchecked")
PersistableBundle(Parcel in) {
    this.map = (HashMap<String, Object>) in.readHashMap(PersistableBundle.class.getClassLoader());
}
 
Example 20
Source File: AppDataManager.java    From ToDay with MIT License 2 votes vote down vote up
public AppDataManager(Parcel in) {
    dataMap = in.readHashMap(getClass().getClassLoader());

}