Merge "Fixed NdefTag parcelable conversion methods." into gingerbread
This commit is contained in:
@@ -205,6 +205,7 @@ public class NdefTag extends Tag implements Parcelable {
|
||||
dest.writeStringArray(mNdefTargets);
|
||||
dest.writeInt(mMessages.length);
|
||||
for (NdefMessage[] ms : mMessages) {
|
||||
dest.writeInt(ms.length);
|
||||
dest.writeTypedArray(ms, flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ public class RawTagConnection {
|
||||
|
||||
mService = service;
|
||||
mTagService = service.getNfcTagInterface();
|
||||
mService.openTagConnection(tag); // TODO(nxp): don't connect until connect()
|
||||
mTag = tag;
|
||||
mSelectedTarget = target;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public class Tag implements Parcelable {
|
||||
/*package*/ static byte[] readBytesWithNull(Parcel in) {
|
||||
int len = in.readInt();
|
||||
byte[] result = null;
|
||||
if (len > 0) {
|
||||
if (len >= 0) {
|
||||
result = new byte[len];
|
||||
in.readByteArray(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user