Closed
Bug 970238
Opened 11 years ago
Closed 11 years ago
NFC: System app always send NFC_HW_STATE_DISABLE_DISCOVERY to Gecko
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 file)
I found now nfc_manager in System app always sends NFC_HW_STATE_DISABLE_DISCOVERY to gecko, so right now the device cannot detect tags nor devices anymore.
The root cause seems from
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/nfc_manager.js#L176
When the event type is 'unlock', evt.details is null,
so NFC_HW_STATE_DISABLE_DISCOVERY is always sent.
Assignee | ||
Comment 1•11 years ago
|
||
Also even when NFC is disabled in Settings,
nfc_manager still sends NFC_HW_STATE_DISABLE_DISCOVERY to Gecko.
This is triggered by the screenchange event.
Assignee | ||
Comment 2•11 years ago
|
||
Seems related to Bug 959104.
Assignee | ||
Comment 3•11 years ago
|
||
Now I found if I disable Screen Lock from Settings App, the handleEvent in nfc_manager would not be called.
Assignee | ||
Comment 4•11 years ago
|
||
please ignore comment 3, I guess that's because I use an older branch. :(
Assignee | ||
Comment 5•11 years ago
|
||
My WIP patch.
https://github.com/allstarschh/gaia/commit/edd3e1ee41112007e44c7ac0df86faf3a32a2a73
However it still has some bugs,
When the Screen Lock is enabled,
after the booting animation finishes,
screenchange event will come, at this time this.hwState is still off, so nothing will happend.
Then System app will get the value of nfc.enabled, so it will turn on the HW.
However at this time, the Screen is still locked, so supposely it should go into the DISABLE_DISCOVERY state, not ON state.
Assignee | ||
Comment 6•11 years ago
|
||
Assignee: nobody → allstars.chh
Attachment #8373988 -
Flags: review?(alive)
Updated•11 years ago
|
Attachment #8373988 -
Flags: review?(alive) → review+
Comment 7•11 years ago
|
||
BTW you have another bug's commit...
Assignee | ||
Updated•11 years ago
|
Component: NFC → Gaia::System
Assignee | ||
Comment 8•11 years ago
|
||
rebased, I'll merge it now.
Assignee | ||
Comment 9•11 years ago
|
||
merged,
https://github.com/mozilla-b2g/gaia/commit/a676cccc984bdf70f7be656796c5f2144ca35a21
Alive, you're the Man. :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•