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

The following examples show how to use android.os.Parcel#readList() . 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: Result.java    From AndroidUnplash with MIT License 6 votes vote down vote up
@SuppressWarnings({
    "unchecked"
})
public Result createFromParcel(Parcel in) {
    Result instance = new Result();
    instance.id = ((String) in.readValue((String.class.getClassLoader())));
    instance.createdAt = ((String) in.readValue((String.class.getClassLoader())));
    instance.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
    instance.width = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.height = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.color = ((String) in.readValue((String.class.getClassLoader())));
    instance.likes = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.likedByUser = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
    instance.user = ((User) in.readValue((User.class.getClassLoader())));
    in.readList(instance.currentUserCollections, (java.lang.Object.class.getClassLoader()));
    instance.urls = ((Urls) in.readValue((Urls.class.getClassLoader())));
    in.readList(instance.categories, (Category.class.getClassLoader()));
    instance.links = ((Links) in.readValue((Links.class.getClassLoader())));
    return instance;
}
 
Example 2
Source File: Comment.java    From android-proguards with Apache License 2.0 6 votes vote down vote up
protected Comment(Parcel in) {
    id = in.readLong();
    body = in.readString();
    body_html = in.readString();
    long tmpCreated_at = in.readLong();
    created_at = tmpCreated_at != -1 ? new Date(tmpCreated_at) : null;
    depth = in.readInt();
    vote_count = in.readInt();
    user_id = in.readLong();
    user_display_name = in.readString();
    user_portrait_url = in.readString();
    user_job = in.readString();
    if (in.readByte() == 0x01) {
        comments = new ArrayList<Comment>();
        in.readList(comments, Comment.class.getClassLoader());
    } else {
        comments = null;
    }
}
 
Example 3
Source File: BlockChainAccountInfoBean.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 6 votes vote down vote up
protected DataBean(Parcel in) {
    this.head_block_num = in.readString();
    this.refund_request = in.readParcelable(Object.class.getClassLoader());
    this.total_resources = in.readParcelable(TotalResourcesBean.class.getClassLoader());
    this.head_block_time = in.readString();
    this.created = in.readString();
    this.ram_quota = in.readString();
    this.net_limit = in.readParcelable(NetLimitBean.class.getClassLoader());
    this.self_delegated_bandwidth = in.readParcelable(Object.class.getClassLoader());
    this.net_weight = in.readString();
    this.cpu_weight = in.readString();
    this.privileged = in.readByte() != 0;
    this.ram_usage = in.readString();
    this.account_name = in.readString();
    this.last_code_update = in.readString();
    this.cpu_limit = in.readParcelable(CpuLimitBean.class.getClassLoader());
    this.voter_info = in.readParcelable(VoterInfoBean.class.getClassLoader());
    this.permissions = new ArrayList<PermissionsBean>();
    in.readList(this.permissions, PermissionsBean.class.getClassLoader());
}
 
Example 4
Source File: AccessibilityEvent.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
/**
 * Reads an {@link AccessibilityRecord} from a parcel.
 *
 * @param record The record to initialize.
 * @param parcel The parcel to read from.
 */
private void readAccessibilityRecordFromParcel(AccessibilityRecord record,
        Parcel parcel) {
    record.mBooleanProperties = parcel.readInt();
    record.mCurrentItemIndex = parcel.readInt();
    record.mItemCount = parcel.readInt();
    record.mFromIndex = parcel.readInt();
    record.mToIndex = parcel.readInt();
    record.mScrollX = parcel.readInt();
    record.mScrollY =  parcel.readInt();
    record.mScrollDeltaX =  parcel.readInt();
    record.mScrollDeltaY =  parcel.readInt();
    record.mMaxScrollX = parcel.readInt();
    record.mMaxScrollY =  parcel.readInt();
    record.mAddedCount = parcel.readInt();
    record.mRemovedCount = parcel.readInt();
    record.mClassName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    record.mContentDescription = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    record.mBeforeText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    record.mParcelableData = parcel.readParcelable(null);
    parcel.readList(record.mText, null);
    record.mSourceWindowId = parcel.readInt();
    record.mSourceNodeId = parcel.readLong();
    record.mSealed = (parcel.readInt() == 1);
}
 
Example 5
Source File: FinishedApk.java    From aptoide-client with GNU General Public License v2.0 6 votes vote down vote up
private FinishedApk(Parcel in) {
    name = in.readString();
    apkid = in.readString();
    appHashId = in.readLong();
    iconpath = in.readString();
    path = in.readString();
    permissionsList = new ArrayList<String>();
    in.readList(permissionsList, null);
    repoName = in.readString();
    id = in.readLong();
    referrer = in.readString();


    Log.d("AptoideFinishApkParcOut", "Path" + path);


}
 
Example 6
Source File: PaymentServices.java    From aptoide-client with GNU General Public License v2.0 5 votes vote down vote up
private PaymentServices(Parcel in) {
    id = in.readInt();
    short_name = in.readString();
    name = in.readString();
    if(types==null)
        types = new ArrayList<PaymentType>();
    in.readList(types, PaymentType.class.getClassLoader());
    price = in.readDouble();
    currency=in.readString();
    taxRate=in.readDouble();
    sign= in.readString();
    service_id= in.readString();
    inapp_secret= in.readString();
}
 
Example 7
Source File: Movies.java    From Beginner-Level-Android-Studio-Apps with GNU General Public License v3.0 5 votes vote down vote up
protected Movies(Parcel in) {
    this.title = in.readString();
    this.id = in.readString();
    this.posterURL = in.readString();
    this.plot = in.readString();
    this.rating = in.readString();
    this.date = in.readString();
    this.genreIds = new ArrayList<>();
    in.readList(this.genreIds, Integer.class.getClassLoader());
    this.videoImage = in.readString();
    this.voteCount = in.readString();
}
 
Example 8
Source File: Credits.java    From android-popular-movies-app with Apache License 2.0 5 votes vote down vote up
private Credits(Parcel in) {
    if (in.readByte() == BYTE) {
        mCast = new ArrayList<>();
        in.readList(mCast, Cast.class.getClassLoader());
    } else {
        mCast = null;
    }
    if (in.readByte() == BYTE) {
        mCrew = new ArrayList<>();
        in.readList(mCrew, Crew.class.getClassLoader());
    } else {
        mCrew = null;
    }
}
 
Example 9
Source File: ProvisionedMeshNode.java    From Android-nRF-Mesh-Library with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Ignore
protected ProvisionedMeshNode(Parcel in) {
    //noinspection ConstantConditions
    uuid = in.readString();
    isConfigured = in.readByte() != 1;
    nodeName = in.readString();
    in.readList(mAddedNetKeys, NodeKey.class.getClassLoader());
    mFlags = in.createByteArray();
    unicastAddress = in.readInt();
    deviceKey = in.createByteArray();
    ttl = (Integer) in.readValue(Integer.class.getClassLoader());
    sequenceNumber = in.readInt();
    companyIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
    productIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
    versionIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
    crpl = (Integer) in.readValue(Integer.class.getClassLoader());
    nodeFeatures = (Features) in.readValue(Features.class.getClassLoader());
    in.readMap(mElements, Element.class.getClassLoader());
    sortElements(mElements);
    in.readList(mAddedAppKeys, NodeKey.class.getClassLoader());
    mTimeStampInMillis = in.readLong();
    mSeqAuth = in.readParcelable(SparseIntArrayParcelable.class.getClassLoader());
    secureNetworkBeaconSupported = (Boolean) in.readValue(Boolean.class.getClassLoader());
    networkTransmitSettings = in.readParcelable(NetworkTransmitSettings.class.getClassLoader());
    relaySettings = in.readParcelable(RelaySettings.class.getClassLoader());
    blackListed = in.readInt() != 1;

}
 
Example 10
Source File: TrackToRemoveWithPosition.java    From spotify-web-api-android with MIT License 4 votes vote down vote up
protected TrackToRemoveWithPosition(Parcel in) {
    this.uri = in.readString();
    this.positions = new ArrayList<Integer>();
    in.readList(this.positions, List.class.getClassLoader());
}
 
Example 11
Source File: CardPresenter.java    From BarcodeEye with Apache License 2.0 4 votes vote down vote up
protected CardPresenter(Parcel in) {
    in.readList(mImages, Uri.class.getClassLoader());
    mText = in.readString();
    mFooter = in.readString();
    mPendingIntent = in.readParcelable(PendingIntent.class.getClassLoader());
}
 
Example 12
Source File: SketchFile.java    From APDE with GNU General Public License v2.0 4 votes vote down vote up
private SketchFile(Parcel source) {
	initFragment();
	
	title = source.readString();
	suffix = source.readString();
	
	undo = new LinkedList<>();
	redo = new LinkedList<>();
	
	source.readList(undo, getClass().getClassLoader());
	source.readList(redo, getClass().getClassLoader());
	
	enabled = source.readByte() != 0;
	
	tabNum = source.readInt();
	
	text = source.readString();
	
	selectionStart = source.readInt();
	selectionEnd = source.readInt();
	
	scrollX = source.readInt();
	scrollY = source.readInt();
	
	compilerProblems = new ArrayList<>();
}
 
Example 13
Source File: DayOfWeekUSourceData.java    From Easer with GNU General Public License v3.0 4 votes vote down vote up
private DayOfWeekUSourceData(Parcel in) {
    ArrayList<Integer> list = new ArrayList<>();
    in.readList(list, null);
    days.clear();
    days.addAll(list);
}
 
Example 14
Source File: CastedArrayListLceViewState.java    From mosby with Apache License 2.0 4 votes vote down vote up
@Override protected void readFromParcel(Parcel source) {
  loadedData = (D) new ArrayList<Parcelable>();
  source.readList(loadedData, getClassLoader());
  super.readFromParcel(source);
}
 
Example 15
Source File: SignatureView.java    From ResearchStack with Apache License 2.0 4 votes vote down vote up
private SignatureSavedState(Parcel in) {
    super(in);
    this.points = new ArrayList<>();
    in.readList(points, LinePathPoint.class.getClassLoader());
}
 
Example 16
Source File: Feed.java    From 1Rramp-Android with MIT License 4 votes vote down vote up
protected Feed(Parcel in) {
  maxAcceptedPayoutValue = in.readString();
  isResteemed = in.readByte() != 0x00;
  author = in.readString();
  permlink = in.readString();
  category = in.readString();
  parentAuthor = in.readString();
  parentPermlink = in.readString();
  title = in.readString();
  body = in.readString();
  cleanedBody = in.readString();
  featuredImageUrl = in.readString();
  format = in.readString();
  if (in.readByte() == 0x01) {
    tags = new ArrayList<String>();
    in.readList(tags, String.class.getClassLoader());
  } else {
    tags = null;
  }
  createdAt = in.readString();
  depth = in.readInt();
  children = in.readInt();
  totalPayoutValue = in.readString();
  curatorPayoutValue = in.readString();
  rootAuthor = in.readString();
  rootPermlink = in.readString();
  url = in.readString();
  pendingPayoutValue = in.readString();
  totalPendingPayoutValue = in.readString();
  cashOutTime = in.readString();
  if (in.readByte() == 0x01) {
    voters = new ArrayList<Voter>();
    in.readList(voters, Voter.class.getClassLoader());
  } else {
    voters = null;
  }
  if (in.readByte() == 0x01) {
    activeVoters = new ArrayList<Voter>();
    in.readList(activeVoters, Voter.class.getClassLoader());
  } else {
    activeVoters = null;
  }
  authorReputation = in.readString();
  rank = in.readInt();
  prize = in.readString();
}
 
Example 17
Source File: ParcelableListLceViewState.java    From mosby with Apache License 2.0 4 votes vote down vote up
@Override protected void readFromParcel(Parcel source) {
  loadedData = (D) new ArrayList<Parcelable>();
  source.readList(loadedData, getClassLoader());
  super.readFromParcel(source);
}
 
Example 18
Source File: ExpandableListView.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
/**
 * Constructor called from {@link #CREATOR}
 */
private SavedState(Parcel in) {
    super(in);
    expandedGroupMetadataList = new ArrayList<ExpandableListConnector.GroupMetadata>();
    in.readList(expandedGroupMetadataList, ExpandableListConnector.class.getClassLoader());
}
 
Example 19
Source File: PackageOps.java    From AppOpsX with MIT License 4 votes vote down vote up
protected PackageOps(Parcel in) {
  this.mPackageName = in.readString();
  this.mUid = in.readInt();
  this.mEntries = new ArrayList<OpEntry>();
  in.readList(this.mEntries, OpEntry.class.getClassLoader());
}
 
Example 20
Source File: InstantAppIntentFilter.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
InstantAppIntentFilter(Parcel in) {
    mSplitName = in.readString();
    in.readList(mFilters, null /*loader*/);
}