Closed Bug 1018308 Opened 5 years ago Closed 5 years ago
_FORMATABLE handling in Nfc Manager should be fixed
After consulting with Dimi, Garner and Sid we came to conclusion that NDEF_FORMATABLE tech type is not properly handled in NfcManager. Currently NfcManager tries to connect to the tag and then calls readNDEF on it. This is wrong as connect is currently a noop. Even if it would be working, performing readNDEF would fail on the NDEF_FORMATBLE tech type as it does not contain any NDEF records. It might contain some proprietary data though. NDEF_FORMATABLE should be handled likewise as other unsupported tags. So it should trigger an 'nfc-tag-discovered' MozActivity.
Comment on attachment 8434196 [details] [review] pull-request-1018308.txt If I understand it correctly, what we do in this patch is to delegate the handler of NDEF_FORMATABLE to others, just like the unknown tags. So the patch deleted the handler in the code, and forward it with some extra information. It looks good on me. I only one concern is that if it's possible to write down the specific switching case instead of falling back to the default section.
Attachment #8434196 - Flags: review?(gweng) → review+
Yes, you understand correctly. I'll wait for Bug 1017572 to be merged and than rebase and add NDEF_FORMATABLE case for readability as you suggested. Thank you for the review.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
You need to log in before you can comment on or make changes to this bug.