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

The following examples show how to use android.os.Parcel#readSerializable() . 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: ImageFolder.java    From imsdk-android with MIT License 5 votes vote down vote up
protected ImageFolder(Parcel in) {
    this.name = in.readString();
    this.path = in.readString();
    this.cover = (ImageItem) in.readSerializable();
    this.images = new ArrayList<ImageItem>();
    in.readList(this.images, ImageItem.class.getClassLoader());
}
 
Example 2
Source File: Asset.java    From vault with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
Asset(Parcel in) {
  setRemoteId(in.readString());

  setCreatedAt(in.readString());

  if (in.readInt() != -1) {
    setUpdatedAt(in.readString());
  }

  this.url = in.readString();

  this.mimeType = in.readString();

  if (in.readInt() == -1) {
    this.title = null;
  } else {
    this.title = in.readString();
  }

  if (in.readInt() == -1) {
    this.description = null;
  } else {
    this.description = in.readString();
  }

  if (in.readInt() == -1) {
    this.file = null;
  } else {
    this.file = (HashMap<String, Object>) in.readSerializable();
  }
}
 
Example 3
Source File: Day.java    From timecat with Apache License 2.0 5 votes vote down vote up
protected Day(Parcel in) {
    int tmpState = in.readInt();
    this.state = tmpState == -1 ? null : State.values()[tmpState];
    this.date = (CalendarDate) in.readSerializable();
    this.posRow = in.readInt();
    this.posCol = in.readInt();
}
 
Example 4
Source File: RemoteParamUtil.java    From CC with Apache License 2.0 5 votes vote down vote up
BaseParam(Parcel in) {
    hashCode = in.readInt();
    try {
        clazz = (Class<?>) in.readSerializable();
    } catch(Exception e) {
        CCUtil.printStackTrace(e);
    }
}
 
Example 5
Source File: SampleItem.java    From oneHookLibraryAndroid with Apache License 2.0 5 votes vote down vote up
protected SampleItem(Parcel in) {
    mName = in.readString();
    mType = (SampleItemType) in.readSerializable();
    if (in.readByte() == 0x01) {
        mSubItems = new ArrayList<>();
        in.readList(mSubItems, SampleItem.class.getClassLoader());
    } else {
        mSubItems = null;
    }
}
 
Example 6
Source File: Voice.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private Voice(Parcel in) {
    this.mName = in.readString();
    this.mLocale = (Locale)in.readSerializable();
    this.mQuality = in.readInt();
    this.mLatency = in.readInt();
    this.mRequiresNetworkConnection = (in.readByte() == 1);
    this.mFeatures = new HashSet<String>();
    Collections.addAll(this.mFeatures, in.readStringArray());
}
 
Example 7
Source File: TaskStateBean.java    From DanDanPlayForAndroid with MIT License 5 votes vote down vote up
public TaskStateBean(Parcel source) {
    torrentHash = source.readString();
    taskName = source.readString();
    saveDirPath = source.readString();
    stateCode = (TorrentStateCode) source.readSerializable();
    progress = source.readInt();
    receivedBytes = source.readLong();
    totalBytes = source.readLong();
    downloadSpeed = source.readLong();
    taskBuildTime = source.readLong();
}
 
Example 8
Source File: RideParameters.java    From rides-android-sdk with MIT License 5 votes vote down vote up
protected RideParameters(Parcel in) {
    isPickupMyLocation = in.readByte() != 0;
    productId = in.readString();
    pickupLatitude = (Double) in.readSerializable();
    pickupLongitude = (Double) in.readSerializable();
    pickupNickname = in.readString();
    pickupAddress = in.readString();
    dropoffLatitude = (Double) in.readSerializable();
    dropoffLongitude = (Double) in.readSerializable();
    dropoffNickname = in.readString();
    dropoffAddress = in.readString();
    userAgent = in.readString();
}
 
Example 9
Source File: Transaction.java    From fingen with Apache License 2.0 5 votes vote down vote up
protected Transaction(Parcel in) {
    super(in);
    this.headerPosition = in.readInt();
    long tmpMDateTime = in.readLong();
    this.mDateTime = tmpMDateTime == -1 ? null : new Date(tmpMDateTime);
    this.mAccountID = in.readLong();
    this.mDestAccountID = in.readLong();
    this.mPayeeID = in.readLong();
    this.mCategoryID = in.readLong();
    this.mAmount = (BigDecimal) in.readSerializable();
    this.mFromAccountBalance = (BigDecimal) in.readSerializable();
    this.mToAccountBalance = (BigDecimal) in.readSerializable();
    this.mProjectID = in.readLong();
    this.mSimpleDebtID = in.readLong();
    this.mDepartmentID = in.readLong();
    this.mLocationID = in.readLong();
    this.mLat = in.readDouble();
    this.mLon = in.readDouble();
    this.mAccuracy = in.readInt();
    this.mComment = in.readString();
    this.mFile = in.readString();
    this.mTransactionOpened = in.readByte() != 0;
    this.mExchangeRate = (BigDecimal) in.readSerializable();
    this.mTransactionType = in.readInt();
    this.mSelected = in.readByte() != 0;
    this.mAutoCreated = in.readByte() != 0;
    this.isExRateEvalDisabled = in.readByte() != 0;
    this.isDayFirst = in.readByte() != 0;
    this.isDayLast = in.readByte() != 0;
    this.mFN = in.readLong();
    this.mFD = in.readLong();
    this.mFP = in.readLong();
    this.mProductEntries = in.createTypedArrayList(ProductEntry.CREATOR);
}
 
Example 10
Source File: DrawText.java    From PaintView with MIT License 4 votes vote down vote up
private DrawText(Parcel in) {
    paint = (SerializablePaint)in.readSerializable();
}
 
Example 11
Source File: BreadCrumbLayout.java    From Orin with GNU General Public License v3.0 4 votes vote down vote up
protected Crumb(Parcel in) {
    this.file = (File) in.readSerializable();
    this.scrollPos = in.readInt();
}
 
Example 12
Source File: HeadsetUSourceData.java    From Easer with GNU General Public License v3.0 4 votes vote down vote up
private HeadsetUSourceData(Parcel in) {
    hs_state = (HeadsetState) in.readSerializable();
    hs_type = (HeadsetType) in.readSerializable();
}
 
Example 13
Source File: ScheduleSlot.java    From droidconat-2016 with Apache License 2.0 4 votes vote down vote up
protected ScheduleSlot(Parcel in) {
    time = (LocalDateTime) in.readSerializable();
    sessions = in.createTypedArrayList(Session.CREATOR);
}
 
Example 14
Source File: GroupLifecycleManager.java    From RxGroups with Apache License 2.0 4 votes vote down vote up
@Override
public State createFromParcel(Parcel source) {
  return new State((UUID) source.readSerializable(), source.readLong());
}
 
Example 15
Source File: AppGroupCreationContent.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
AppGroupCreationContent(final Parcel in) {
    this.name = in.readString();
    this.description = in.readString();
    this.privacy = (AppGroupPrivacy) in.readSerializable();
}
 
Example 16
Source File: NotificationConfig.java    From Cheerleader with Apache License 2.0 4 votes vote down vote up
/**
 * Parcelable.
 *
 * @param in source.
 */
private NotificationConfig(Parcel in) {
    mNotificationIcon = in.readInt();
    mNotificationIconBackground = in.readInt();
    mNotificationActivity = (Class<? extends Activity>) in.readSerializable();
}
 
Example 17
Source File: XulDataNode.java    From starcor.xul with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public XulDataNode createFromParcel(Parcel in) {
	return (XulDataNode) in.readSerializable();
}
 
Example 18
Source File: TimeZoneModel.java    From arcusandroid with Apache License 2.0 4 votes vote down vote up
protected TimeZoneModel(Parcel in) {
    this.id = in.readString();
    this.name = in.readString();
    this.offset = (Number) in.readSerializable();
    this.usesDST = in.readByte() != 0;
}
 
Example 19
Source File: NavigationPreference.java    From AndroidPreferenceActivity with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new data structure, which allows to store the internal state of a {@link
 * NavigationPreference}. This constructor is used when reading from a parcel. It reads the
 * state of the superclass.
 *
 * @param source
 *         The parcel to read read from as a instance of the class {@link Parcel}. The
 *         parcel may not be null
 */
SavedState(@NonNull final Parcel source) {
    super(source);
    breadCrumbTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
    fragment = source.readString();
    extras = source.readBundle(NavigationPreference.class.getClassLoader());
    tintList = source.readParcelable(getClass().getClassLoader());
    tintMode = (PorterDuff.Mode) source.readSerializable();
}
 
Example 20
Source File: ScrollableArea.java    From AndroidMaterialDialog with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new scrollable area.
 *
 * @param source
 *         The source, the scrollable area should be created from, as an instance of the class
 *         {@link Parcel}. The source may not be null
 */
private ScrollableArea(@NonNull final Parcel source) {
    this.topScrollableArea = (Area) source.readSerializable();
    this.bottomScrollableArea = (Area) source.readSerializable();
}