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

The following examples show how to use android.os.Parcel#readLong() . These examples are extracted from open source projects. 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 Project: alpha-wallet-android   File: Token.java    License: 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 2
Source Project: iBeebo   File: DMBean.java    License: GNU General Public License v3.0 6 votes vote down vote up
public DMBean createFromParcel(Parcel in) {
    DMBean dmBean = new DMBean();
    dmBean.id = in.readLong();

    dmBean.idstr = in.readString();
    dmBean.created_at = in.readString();
    dmBean.text = in.readString();
    dmBean.sender_id = in.readString();
    dmBean.recipient_id = in.readString();
    dmBean.sender_screen_name = in.readString();
    dmBean.recipient_screen_name = in.readString();
    dmBean.mid = in.readString();
    dmBean.source = in.readString();
    dmBean.status_id = in.readString();
    dmBean.geo = in.readString();

    dmBean.mills = in.readLong();

    dmBean.sender = in.readParcelable(UserBean.class.getClassLoader());
    dmBean.recipient = in.readParcelable(UserBean.class.getClassLoader());

    return dmBean;
}
 
Example 3
private Event(Parcel in) {
  this.spliceEventId = in.readLong();
  this.spliceEventCancelIndicator = in.readByte() == 1;
  this.outOfNetworkIndicator = in.readByte() == 1;
  this.programSpliceFlag = in.readByte() == 1;
  int componentSpliceListLength = in.readInt();
  ArrayList<ComponentSplice> componentSpliceList = new ArrayList<>(componentSpliceListLength);
  for (int i = 0; i < componentSpliceListLength; i++) {
    componentSpliceList.add(ComponentSplice.createFromParcel(in));
  }
  this.componentSpliceList = Collections.unmodifiableList(componentSpliceList);
  this.utcSpliceTime = in.readLong();
  this.autoReturn = in.readByte() == 1;
  this.breakDurationUs = in.readLong();
  this.uniqueProgramId = in.readInt();
  this.availNum = in.readInt();
  this.availsExpected = in.readInt();
}
 
Example 4
Source Project: SoloPi   File: RecordCaseInfo.java    License: Apache License 2.0 5 votes vote down vote up
protected RecordCaseInfo(Parcel in) {
    this.id = (Long) in.readValue(Long.class.getClassLoader());
    this.caseName = in.readString();
    this.caseDesc = in.readString();
    this.targetAppPackage = in.readString();
    this.targetAppLabel = in.readString();
    this.recordMode = in.readString();
    this.advanceSettings = in.readString();
    this.operationLog = in.readString();
    this.priority = in.readInt();
    this.gmtCreate = in.readLong();
    this.gmtModify = in.readLong();
}
 
Example 5
protected LocalMediaFolder(Parcel in) {
    this.bucketId = in.readLong();
    this.name = in.readString();
    this.firstImagePath = in.readString();
    this.imageNum = in.readInt();
    this.checkedNum = in.readInt();
    this.isChecked = in.readByte() != 0;
    this.ofAllType = in.readInt();
    this.isCameraFolder = in.readByte() != 0;
    this.data = in.createTypedArrayList(LocalMedia.CREATOR);
    this.currentDataPage = in.readInt();
    this.isHasMore = in.readByte() != 0;
}
 
Example 6
Source Project: ImagePicker   File: ImageItem.java    License: Apache License 2.0 5 votes vote down vote up
protected ImageItem(Parcel in) {
    this.name = in.readString();
    this.path = in.readString();
    this.size = in.readLong();
    this.width = in.readInt();
    this.height = in.readInt();
    this.mimeType = in.readString();
    this.addTime = in.readLong();
}
 
Example 7
private ImageModel(Parcel in) {
    String[] data = new String[2];
    in.readStringArray(data);
    fileName = data[0];
    completePath = data[1];
    lastModified = in.readLong();
    savedLocally= in.readInt() != 0;
}
 
Example 8
Source Project: Woocommerce-Android-Client   File: Categories.java    License: MIT License 5 votes vote down vote up
protected Categories(Parcel in) {
    id = in.readLong();
    name = in.readString();
    slug = in.readString();
    parent_id = in.readInt();
    description = in.readString();
    display = in.readString();
    image = in.readString();
    count = in.readInt();
}
 
Example 9
private DashboardTile(Parcel in) {
    id = in.readLong();
    titleRes = in.readInt();
    title = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    summaryRes = in.readInt();
    summary = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    iconRes = in.readInt();
    fragment = in.readString();
    fragmentArguments = in.readBundle();
    if (in.readInt() != 0) {
        intent = Intent.CREATOR.createFromParcel(in);
    }
    extras = in.readBundle();
}
 
Example 10
Source Project: FriendBook   File: Book.java    License: GNU General Public License v3.0 5 votes vote down vote up
protected Book(Parcel in) {
    this.id = in.readString();
    this.coverUrl = in.readString();
    this.name = in.readString();
    this.describe = in.readString();
    this.author = in.readString();
    this.isFinished = in.readByte() != 0;
    this.bookTypeId = in.readInt();
    this.bookTypeName = in.readString();
    this.bookWordNum = in.readLong();
    this.clickNum = in.readLong();
    this.collectionNum = in.readLong();
    this.recommendNum = in.readLong();
    this.createDateTime = in.readString();
}
 
Example 11
Source Project: fingen   File: BudgetCreditSync.java    License: Apache License 2.0 5 votes vote down vote up
protected BudgetCreditSync(Parcel in) {
    super(in);
    this.mYear = in.readInt();
    this.mMonth = in.readInt();
    this.mCreditID = in.readLong();
    this.mAmount = in.readDouble();
}
 
Example 12
Source Project: cordova-social-vk   File: VKApiVideo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a Video instance from Parcel.
 */
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.mp4_1080 = in.readString();
    this.external = in.readString();
}
 
Example 13
private Config(Parcel in) {
    scaleType = in.readString();
    fullScreenOnly = in.readByte() != 0;
    defaultRetryTime = in.readLong();
    title = in.readString();
    url = in.readString();
    showNavIcon = in.readByte() != 0;
}
 
Example 14
public LibInfo(Parcel in) {
    mLoadAddress = in.readLong();
    mLoadSize = in.readLong();
    mRelroStart = in.readLong();
    mRelroSize = in.readLong();
    ParcelFileDescriptor fd = in.readFileDescriptor();
    mRelroFd = fd.detachFd();
}
 
Example 15
Source Project: materialistic   File: HackerNewsItem.java    License: Apache License 2.0 5 votes vote down vote up
@Synthetic
HackerNewsItem(Parcel source) {
    id = source.readLong();
    title = source.readString();
    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();
}
 
Example 16
private PrivateCommand(Parcel in) {
  ptsAdjustment = in.readLong();
  identifier = in.readLong();
  commandBytes = new byte[in.readInt()];
  in.readByteArray(commandBytes);
}
 
Example 17
Source Project: mytracks   File: SendRequestTest.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Tests {@link SendRequest#writeToParcel(Parcel, int)}.
 */
public void testWriteToParcel() {
  sendRequest = new SendRequest(4);
  sendRequest.setSendDrive(true);
  sendRequest.setSendMaps(true);
  sendRequest.setSendFusionTables(true);
  sendRequest.setSendSpreadsheets(true);
  sendRequest.setDriveSync(true);
  sendRequest.setDriveSharePublic(true);
  sendRequest.setDriveShareEmails(DRIVE_SHARE_EMAILS);
  Account accountNew = new Account(ACCOUNTNAME + "2", ACCOUNTYPE + "2");
  sendRequest.setAccount(accountNew);
  sendRequest.setMapsSuccess(true);
  sendRequest.setDriveSuccess(true);
  sendRequest.setFusionTablesSuccess(true);
  sendRequest.setSpreadsheetsSuccess(true);
  sendRequest.setShareUrl(SHARE_URL);
  Parcel parcel = Parcel.obtain();
  parcel.setDataPosition(0);
  sendRequest.writeToParcel(parcel, 1);
  parcel.setDataPosition(0);
  long trackId = parcel.readLong();
  boolean sendDrive = parcel.readByte() == 1;
  boolean sendMaps = parcel.readByte() == 1;
  boolean sendFusionTables = parcel.readByte() == 1;
  boolean sendSpreadsheets = parcel.readByte() == 1;
  boolean driveSync = parcel.readByte() == 1;
  boolean driveSharePublic = parcel.readByte() == 1;
  String driveShareEmails = parcel.readString();
  Parcelable account = parcel.readParcelable(null);
  boolean driveSuccess = parcel.readByte() == 1;
  boolean mapsSuccess = parcel.readByte() == 1;
  boolean fusionTablesSuccess = parcel.readByte() == 1;
  boolean spreadsheetsSuccess = parcel.readByte() == 1;
  String shareUrl = parcel.readString();
  assertEquals(4, trackId);
  assertTrue(sendDrive);
  assertTrue(sendMaps);
  assertTrue(sendFusionTables);
  assertTrue(sendSpreadsheets);
  assertTrue(driveSync);
  assertTrue(driveSharePublic);
  assertEquals(DRIVE_SHARE_EMAILS, driveShareEmails);
  assertEquals(accountNew, account);
  assertTrue(driveSuccess);
  assertTrue(mapsSuccess);
  assertTrue(fusionTablesSuccess);
  assertTrue(spreadsheetsSuccess);
  assertEquals(SHARE_URL, shareUrl);
}
 
Example 18
private PrivateCommand(Parcel in) {
  ptsAdjustment = in.readLong();
  identifier = in.readLong();
  commandBytes = new byte[in.readInt()];
  in.readByteArray(commandBytes);
}
 
Example 19
Source Project: android_9.0.0_r45   File: PackageInfo.java    License: Apache License 2.0 4 votes vote down vote up
private PackageInfo(Parcel source) {
    packageName = source.readString();
    splitNames = source.createStringArray();
    versionCode = source.readInt();
    versionCodeMajor = source.readInt();
    versionName = source.readString();
    baseRevisionCode = source.readInt();
    splitRevisionCodes = source.createIntArray();
    sharedUserId = source.readString();
    sharedUserLabel = source.readInt();
    int hasApp = source.readInt();
    if (hasApp != 0) {
        applicationInfo = ApplicationInfo.CREATOR.createFromParcel(source);
    }
    firstInstallTime = source.readLong();
    lastUpdateTime = source.readLong();
    gids = source.createIntArray();
    activities = source.createTypedArray(ActivityInfo.CREATOR);
    receivers = source.createTypedArray(ActivityInfo.CREATOR);
    services = source.createTypedArray(ServiceInfo.CREATOR);
    providers = source.createTypedArray(ProviderInfo.CREATOR);
    instrumentation = source.createTypedArray(InstrumentationInfo.CREATOR);
    permissions = source.createTypedArray(PermissionInfo.CREATOR);
    requestedPermissions = source.createStringArray();
    requestedPermissionsFlags = source.createIntArray();
    signatures = source.createTypedArray(Signature.CREATOR);
    configPreferences = source.createTypedArray(ConfigurationInfo.CREATOR);
    reqFeatures = source.createTypedArray(FeatureInfo.CREATOR);
    featureGroups = source.createTypedArray(FeatureGroupInfo.CREATOR);
    installLocation = source.readInt();
    isStub = source.readInt() != 0;
    coreApp = source.readInt() != 0;
    requiredForAllUsers = source.readInt() != 0;
    restrictedAccountType = source.readString();
    requiredAccountType = source.readString();
    overlayTarget = source.readString();
    overlayCategory = source.readString();
    overlayPriority = source.readInt();
    mOverlayIsStatic = source.readBoolean();
    compileSdkVersion = source.readInt();
    compileSdkVersionCodename = source.readString();
    int hasSigningInfo = source.readInt();
    if (hasSigningInfo != 0) {
        signingInfo = SigningInfo.CREATOR.createFromParcel(source);
    }

    // The component lists were flattened with the redundant ApplicationInfo
    // instances omitted.  Distribute the canonical one here as appropriate.
    if (applicationInfo != null) {
        propagateApplicationInfo(applicationInfo, activities);
        propagateApplicationInfo(applicationInfo, receivers);
        propagateApplicationInfo(applicationInfo, services);
        propagateApplicationInfo(applicationInfo, providers);
    }
}
 
Example 20
private BackupProgress(Parcel in) {
    bytesExpected = in.readLong();
    bytesTransferred = in.readLong();
}