Commit f4fc49f5 authored by Francois Beaufort's avatar Francois Beaufort Committed by Commit Bot

[WebNFC] Fix NullPointerException when reading unhandled records

This CL makes sure a NullPointerException is not fired when reading a
record that is not handled yet by Web NFC.

Bug: 520391
Change-Id: I3325816db121cd03829d9d414ae67343d716a37f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1932787Reviewed-by: default avatarLeon Han <leon.han@intel.com>
Reviewed-by: default avatarRijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Auto-Submit: François Beaufort <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/master@{#719043}
parent 76378705
......@@ -211,7 +211,9 @@ public final class NdefMessageUtils {
new String(ndefRecord.getType(), "UTF-8"), ndefRecord.getPayload());
break;
}
if (record != null) {
record.id = new String(ndefRecord.getId(), "UTF-8");
}
return record;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment