Fix parcelable error.

This commit is contained in:
Adrian Tiberius 2015-08-11 07:52:45 +03:00
parent a64d216537
commit 205a7ba140
1 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import android.os.Parcelable;
import org.ethereum.core.Block; import org.ethereum.core.Block;
import org.ethereum.core.TransactionReceipt; import org.ethereum.core.TransactionReceipt;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -60,6 +61,10 @@ public class BlockEventData extends EventData {
super(in); super(in);
block = in.readParcelable(org.ethereum.android.interop.Block.class.getClassLoader()); block = in.readParcelable(org.ethereum.android.interop.Block.class.getClassLoader());
receipts = Arrays.asList((TransactionReceipt[])in.readParcelableArray(TransactionReceipt.class.getClassLoader())); receipts = new ArrayList<>();
Parcelable[] items = in.readParcelableArray(TransactionReceipt.class.getClassLoader());
for (Parcelable item: items) {
receipts.add((TransactionReceipt)item);
}
} }
} }