Closed Bug 1018308 Opened 10 years ago Closed 10 years ago

[NFC] NDEF_FORMATABLE handling in NfcManager should be fixed

Categories

(Firefox OS Graveyard :: NFC, defect)

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.0 S4 (20june)
tracking-b2g backlog

People

(Reporter: tauzen, Assigned: tauzen)

References

Details

Attachments

(1 file)

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.
Assignee: nobody → kmioduszewski
Blocks: 1006375, NFC-Gaia
blocking-b2g: --- → backlog
Attached file pull-request-1018308.txt (deleted) —
Attachment #8434196 - Flags: review?(gweng)
Comment on attachment 8434196 [details] 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.
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Target Milestone: --- → 2.0 S4 (20june)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: