Closed Bug 958423 Opened 11 years ago Closed 11 years ago

B2G NFC: ndef in 'nfc-manager-tech-discovered' is two levels of array.

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
1.3 C2/1.4 S2(17jan)

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

Attachments

(2 files, 1 obsolete file)

In the system message, nfc-manager-tech-discovered, it contains a ndef property,however it's in two levels of array: [[{...}, {...}] The outter one is the array of NdefMessages, the inner one is the array of NdefRecords. Given that only one NdefMessage is needed, for simplicity we could use only 1 level of array here. Also Gaia won't have to always pick the first NdefMessage in https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/nfc_manager.js#L375
Also the NdefMessage in nfc-manager-tech-discovered system message is called 'ndef', however in the ReadNdefResponse it's caleld 'records'. The naming should be consistent here.
Attached patch Bug958423.patch (obsolete) — Splinter Review
Assignee: nobody → allstars.chh
Attachment #8359094 - Flags: review?(alive) → review+
Attached patch Patch v2.Splinter Review
rebase for Bug 950269 is landed.
Attachment #8359091 - Attachment is obsolete: true
Attachment #8360163 - Flags: review+
Looks like the Pull Request has conflicts. Please rebase and re-request checkin :)
Keywords: checkin-needed
Whiteboard: [leave open for Gaia patch]
Blocks: 960222
Thanks, I have re-pushed again to fix the conflict. Adding checkin-needed back to the Gaia patch.
Keywords: checkin-needed
Whiteboard: [leave open for Gaia patch]
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
Patch 2 seems to P2P break presence detect, which has no ndefMessage to unmarshall: I/Gecko ( 179): Nfc Worker: Handling parcel as NFC_NOTIFICATION_TECH_DISCOVERED I/Gecko ( 179): Nfc Worker: NFC_NOTIFICATION_TECH_DISCOVERED I/Gecko ( 179): Nfc Worker: Parcel handling threw Error: Trying to read data beyond the parcel end!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: