Java Code Examples for android.os.Parcel.readInt()

The following are Jave code examples for showing how to use readInt() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: mesh-core-on-android   File: MeshElementInfo.java   View Source Code Vote up 6 votes
public MeshElementInfo createFromParcel(Parcel in) {
	MeshElementInfo eltInfo = new MeshElementInfo();
	int n;
	byte[] tmp;

	n = in.readInt();
	tmp = new byte[n];
	in.readByteArray(tmp);
	eltInfo.mMids = byteArrayToShortArray(tmp);

	n = in.readInt();
	eltInfo.mVmids = new int[n];
	in.readIntArray(eltInfo.mVmids);

	return eltInfo;
}
 
Example 2
Project: q-mail   File: OpenPgpMetadata.java   View Source Code Vote up 6 votes
public OpenPgpMetadata createFromParcel(final Parcel source) {
    int version = source.readInt(); // parcelableVersion
    int parcelableSize = source.readInt();
    int startPosition = source.dataPosition();

    OpenPgpMetadata vr = new OpenPgpMetadata();
    vr.filename = source.readString();
    vr.mimeType = source.readString();
    vr.modificationTime = source.readLong();
    vr.originalSize = source.readLong();
    if (version >= 2) {
        vr.charset = source.readString();
    }

    // skip over all fields added in future versions of this parcel
    source.setDataPosition(startPosition + parcelableSize);

    return vr;
}
 
Example 3
Project: boohee_v5.6   File: RecordSport.java   View Source Code Vote up 6 votes
protected RecordSport(Parcel in) {
    boolean z = true;
    this.id = in.readInt();
    this.record_on = in.readString();
    this.duration = in.readFloat();
    this.activity_id = in.readInt();
    this.activity_name = in.readString();
    this.calory = in.readFloat();
    this.thumb_img_url = in.readString();
    this.unit_name = in.readString();
    this.mets = in.readFloat();
    if (in.readByte() == (byte) 0) {
        z = false;
    }
    this.isChecked = z;
}
 
Example 4
Project: BluetoothKit   File: BeaconDevice.java   View Source Code Vote up 5 votes
private BeaconDevice(Parcel in) {
    this.bluetoothDevice = in.readParcelable(BluetoothDevice.class.getClassLoader());
    this.rssi = in.readInt();
    this.scanRecord = in.createByteArray();
    this.deviceName = in.readString();
    this.iBeacon = in.readParcelable(IBeacon.class.getClassLoader());
    this.lastUpdatedTimeMillis = in.readLong();
}
 
Example 5
Project: OpenHub   File: Repository.java   View Source Code Vote up 5 votes
protected Repository(Parcel in) {
    this.id = in.readInt();
    this.name = in.readString();
    this.fullName = in.readString();
    this.repPrivate = in.readByte() != 0;
    this.htmlUrl = in.readString();
    this.description = in.readString();
    this.language = in.readString();
    this.owner = in.readParcelable(User.class.getClassLoader());
    this.defaultBranch = in.readString();
    long tmpCreatedAt = in.readLong();
    this.createdAt = tmpCreatedAt == -1 ? null : new Date(tmpCreatedAt);
    long tmpUpdatedAt = in.readLong();
    this.updatedAt = tmpUpdatedAt == -1 ? null : new Date(tmpUpdatedAt);
    long tmpPushedAt = in.readLong();
    this.pushedAt = tmpPushedAt == -1 ? null : new Date(tmpPushedAt);
    this.gitUrl = in.readString();
    this.sshUrl = in.readString();
    this.cloneUrl = in.readString();
    this.svnUrl = in.readString();
    this.size = in.readInt();
    this.stargazersCount = in.readInt();
    this.watchersCount = in.readInt();
    this.forksCount = in.readInt();
    this.openIssuesCount = in.readInt();
    this.subscribersCount = in.readInt();
    this.fork = in.readByte() != 0;
    this.parent = in.readParcelable(Repository.class.getClassLoader());
    this.permissions = in.readParcelable(RepositoryPermissions.class.getClassLoader());
    this.hasIssues = in.readByte() != 0;
    this.hasProjects = in.readByte() != 0;
    this.hasDownloads = in.readByte() != 0;
    this.hasWiki = in.readByte() != 0;
    this.hasPages = in.readByte() != 0;
    this.sinceStargazersCount = in.readInt();
    int tmpTrendingSince = in.readInt();
    this.since = tmpTrendingSince == -1 ? null : TrendingSince.values()[tmpTrendingSince];
}
 
Example 6
Project: container   File: PendingResultData.java   View Source Code Vote up 5 votes
protected PendingResultData(Parcel in) {
    this.mType = in.readInt();
    this.mOrderedHint = in.readByte() != 0;
    this.mInitialStickyHint = in.readByte() != 0;
    this.mToken = in.readStrongBinder();
    this.mSendingUser = in.readInt();
    this.mFlags = in.readInt();
    this.mResultCode = in.readInt();
    this.mResultData = in.readString();
    this.mResultExtras = in.readBundle();
    this.mAbortBroadcast = in.readByte() != 0;
    this.mFinished = in.readByte() != 0;
}
 
Example 7
Project: Bigbang   File: CropImage.java   View Source Code Vote up 5 votes
protected ActivityResult(Parcel in) {
    super(null,
            (Uri) in.readParcelable(Uri.class.getClassLoader()),
            (Exception) in.readSerializable(),
            in.createFloatArray(),
            (Rect) in.readParcelable(Rect.class.getClassLoader()),
            in.readInt(), in.readInt());
}
 
Example 8
Project: Cable-Android   File: IncomingTextMessage.java   View Source Code Vote up 5 votes
public IncomingTextMessage(Parcel in) {
  this.message              = in.readString();
  this.sender               = in.readString();
  this.senderDeviceId       = in.readInt();
  this.protocol             = in.readInt();
  this.serviceCenterAddress = in.readString();
  this.replyPathPresent     = (in.readInt() == 1);
  this.pseudoSubject        = in.readString();
  this.sentTimestampMillis  = in.readLong();
  this.groupId              = in.readString();
  this.push                 = (in.readInt() == 1);
  this.subscriptionId       = in.readInt();
  this.expiresInMillis      = in.readLong();
}
 
Example 9
Project: WebPager   File: CustomViewPager.java   View Source Code Vote up 5 votes
SavedState(Parcel in, ClassLoader loader) {
	super(in);
	if (loader == null) {
		loader = getClass().getClassLoader();
	}
	position = in.readInt();
	adapterState = in.readParcelable(loader);
	this.loader = loader;
}
 
Example 10
Project: gnirehtet   File: VpnConfiguration.java   View Source Code Vote up 5 votes
private VpnConfiguration(Parcel source) {
    int count = source.readInt();
    dnsServers = new InetAddress[count];
    try {
        for (int i = 0; i < count; ++i) {
            dnsServers[i] = InetAddress.getByAddress(source.createByteArray());
        }
    } catch (UnknownHostException e) {
        throw new AssertionError("Invalid address", e);
    }
}
 
Example 11
Project: TakeRest   File: User.java   View Source Code Vote up 5 votes
protected User(Parcel in) {
    this.id = in.readInt();
    this.name = in.readString();
    this.username = in.readString();
    this.html_url = in.readString();
    this.avatar_url = in.readString();
    this.bio = in.readString();
    this.location = in.readString();
    this.links = in.readParcelable(Links.class.getClassLoader());
    this.buckets_count = in.readInt();
    this.comments_received_count = in.readInt();
    this.followers_count = in.readInt();
    this.followings_count = in.readInt();
    this.likes_count = in.readInt();
    this.likes_received_count = in.readInt();
    this.projects_count = in.readInt();
    this.rebounds_received_count = in.readInt();
    this.shots_count = in.readInt();
    this.teams_count = in.readInt();
    this.can_upload_shot = in.readByte() != 0;
    this.type = in.readString();
    this.pro = in.readByte() != 0;
    this.buckets_url = in.readString();
    this.followers_url = in.readString();
    this.following_url = in.readString();
    this.likes_url = in.readString();
    this.projects_url = in.readString();
    this.shots_url = in.readString();
    this.teams_url = in.readString();
    this.created_at = in.readString();
    this.updated_at = in.readString();
}
 
Example 12
Project: android-titanium-imagecropper   File: CropImage.java   View Source Code Vote up 5 votes
protected ActivityResult(Parcel in) {
  super(
      null,
      (Uri) in.readParcelable(Uri.class.getClassLoader()),
      null,
      (Uri) in.readParcelable(Uri.class.getClassLoader()),
      (Exception) in.readSerializable(),
      in.createFloatArray(),
      (Rect) in.readParcelable(Rect.class.getClassLoader()),
      (Rect) in.readParcelable(Rect.class.getClassLoader()),
      in.readInt(),
      in.readInt());
}
 
Example 13
Project: Phoenix-for-VK   File: SpinnerOption.java   View Source Code Vote up 4 votes
protected Entry(Parcel in) {
    id = in.readInt();
    name = in.readInt();
}
 
Example 14
Project: Hands-On-Android-UI-Development   File: Attachment.java   View Source Code Vote up 4 votes
protected Attachment(final Parcel in) {
    id = in.readLong();
    claimItemId = in.readLong();
    file = new File(in.readString());
    type = Type.values()[in.readInt()];
}
 
Example 15
Project: iOS-SwitchView   File: SwitchView.java   View Source Code Vote up 4 votes
private SavedState(Parcel in) {
    super(in);
    isChecked = 1 == in.readInt();
}
 
Example 16
Project: GongXianSheng   File: OrderResponse.java   View Source Code Vote up 4 votes
protected DeliverVehicleBean(Parcel in) {
    licensePlate = in.readString();
    name = in.readString();
    vehicleID = in.readInt();
}
 
Example 17
Project: Phoenix-for-VK   File: MessagesRead.java   View Source Code Vote up 4 votes
protected MessagesRead(Parcel in) {
    super(in);
    peerId = in.readInt();
    toMessageId = in.readInt();
    out = in.readByte() != 0;
}
 
Example 18
Project: RLibrary   File: LargeMessageSnapshot.java   View Source Code Vote up 4 votes
RetryMessageSnapshot(Parcel in) {
    super(in);
    this.retryingTimes = in.readInt();
}
 
Example 19
Project: Farmacias   File: ExpandableSavedState.java   View Source Code Vote up 4 votes
private ExpandableSavedState(Parcel in) {
    super(in);
    this.size = in.readInt();
    this.weight = in.readFloat();
}
 
Example 20
Project: moebooru-android   File: NumberPickerPreference.java   View Source Code Vote up 4 votes
public SavedState(Parcel source) {
    super(source);
    value = source.readInt();
}