Merge "nfc: First chunked NDEF record of TNF doesn't contain the type field"

This commit is contained in:
Treehugger Robot
2017-03-07 01:27:17 +00:00
committed by Gerrit Code Review

View File

@@ -839,7 +839,7 @@ public final class NdefRecord implements Parcelable {
if (cf && !inChunk) {
// first chunk
if (typeLength == 0) {
if (typeLength == 0 && tnf != NdefRecord.TNF_UNKNOWN) {
throw new FormatException("expected non-zero type length in first chunk");
}
chunks.clear();