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

The following are Jave code examples for showing how to use writeLongArray() 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: WearVibrationCenter   File: LiteAlarmCommand.java   View Source Code Vote up 5 votes
@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.text);
    dest.writeLongArray(this.vibrationPattern);
    dest.writeInt(this.snoozeDuration);
    dest.writeByte(this.doNotVibrateInTheater ? (byte) 1 : (byte) 0);
    dest.writeByte(this.doNotVibrateOnCharger ? (byte) 1 : (byte) 0);

    // DataLayer API will only send different items, so if two same alarms are triggered,
    // only one will be triggered. Workaround is to add timestamp to always send changed packet.
    dest.writeLong(System.currentTimeMillis());
}
 
Example 2
Project: WearVibrationCenter   File: AlarmCommand.java   View Source Code Vote up 5 votes
@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.text);
    dest.writeLongArray(this.vibrationPattern);
    dest.writeByteArray(this.backgroundBitmap);
    dest.writeByteArray(this.icon);
    dest.writeInt(this.snoozeDuration);
    dest.writeByte(this.doNotVibrateInTheater ? (byte) 1 : (byte) 0);
    dest.writeByte(this.doNotVibrateOnCharger ? (byte) 1 : (byte) 0);
}
 
Example 3
Project: WearVibrationCenter   File: VibrationCommand.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLongArray(this.pattern);
    dest.writeByte(this.doNotVibrateInTheater ? (byte) 1 : (byte) 0);
    dest.writeByte(this.doNotVibrateOnCharger ? (byte) 1 : (byte) 0);
    dest.writeByte(this.forceTurnScreenOn ? (byte) 1 : (byte) 0);
}
 
Example 4
Project: Todule-android   File: LongSparseArrayBooleanParcelable.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    long[] keys = new long[size()];
    boolean[] values = new boolean[size()];

    for (int k = 0; k < size(); k++){
        keys[k] = keyAt(k);
        values[k] = valueAt(k);
    }

    parcel.writeInt(size());
    parcel.writeLongArray(keys);
    parcel.writeBooleanArray(values);
}
 
Example 5
Project: PaoMovie   File: GifViewSavedState.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	super.writeToParcel(dest, flags);
	dest.writeInt(mStates.length);
	for (long[] mState : mStates)
		dest.writeLongArray(mState);
}
 
Example 6
Project: PaoMovie   File: GifViewSavedState.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	super.writeToParcel(dest, flags);
	dest.writeInt(mStates.length);
	for (long[] mState : mStates)
		dest.writeLongArray(mState);
}
 
Example 7
Project: choreographer-example   File: TransitioningChoreographer.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    int[] statesArray = new int[]{taggingStates[0].ordinal(), taggingStates[1].ordinal()};
    dest.writeIntArray(statesArray);
    dest.writeLongArray(startTimes);
    dest.writeLong(transitionStartTime);
}
 
Example 8
Project: chaosflix   File: Metadata.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	dest.writeLongArray(related);
	dest.writeString(remoteId);
}
 
Example 9
Project: primitive-collections-android   File: LongArrayList.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeInt(mSize);
    dest.writeInt(mItems.length);
    dest.writeLongArray(mItems);
}