in unit/BasicUnitAndroidTest/app/src/main/java/com/example/android/testing/unittesting/basicunitandroidtest/LogHistory.java [42:58]
public void writeToParcel(Parcel out, int flags) {
// Prepare an array of strings and an array of timestamps.
String[] texts = new String[mData.size()];
long[] timestamps = new long[mData.size()];
// Store the data in the arrays.
for (int i = 0; i < mData.size(); i++) {
texts[i] = mData.get(i).first;
timestamps[i] = mData.get(i).second;
}
// Write the size of the arrays first.
out.writeInt(texts.length);
// Write the two arrays in a specific order.
out.writeStringArray(texts);
out.writeLongArray(timestamps);
}