Closed Bug 970241 Opened 12 years ago Closed 12 years ago

B2G NFC: Don't enable/disable NFC when nfc.enabled settings changed

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
1.4 S1 (14feb)

People

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

References

Details

Attachments

(1 file, 2 obsolete files)

Right now Gecko will listen nfc.enabled changed event from Settings app, and nfc-hardware-state-change event from System app. However nfc-hardwre-state-change event is also triggered by nfc.enabled event, so Gecko shouldn't listen to nfc.enabled event anymore.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → allstars.chh
Attachment #8373255 - Flags: review?(dlee)
Comment on attachment 8373255 [details] [diff] [review] Patch Review of attachment 8373255 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/Nfc.js @@ -621,5 @@ > - handle: function handle(aName, aResult) { > - switch(aName) { > - case NFC.SETTING_NFC_ENABLED: > - debug("'nfc.enabled' is now " + aResult); > - this._enabled = aResult; this._enable doesn't assigned here but it seems receiveMessage still checking it ? @@ -629,5 @@ > - // Only if the value changes, set the power config and persist > - if (powerLevel !== this.powerLevel) { > - debug("New Power Level " + powerLevel); > - this.setConfig({powerLevel: powerLevel}); > - this.powerLevel = powerLevel; can we remove powerLevel member variable because we are not using it
Attachment #8373255 - Flags: review?(dlee)
(In reply to Dimi Lee[:dimi][:dlee] from comment #2) > ::: dom/system/gonk/Nfc.js > @@ -621,5 @@ > > - handle: function handle(aName, aResult) { > > - switch(aName) { > > - case NFC.SETTING_NFC_ENABLED: > > - debug("'nfc.enabled' is now " + aResult); > > - this._enabled = aResult; > > this._enable doesn't assigned here but it seems receiveMessage still > checking it ? > Yeah, I think we still need to keep settings related code here. I will address this. Thanks
Attached patch Patch. v2. (obsolete) — Splinter Review
Attachment #8373255 - Attachment is obsolete: true
Attachment #8373991 - Flags: review?(dlee)
Attachment #8373991 - Flags: review?(dlee) → review+
Summary: B2G NFC: Don't listen to nfc.enabled settings changed event → B2G NFC: Don't enable/disable NFC when nfc.enabled settings changed
Attached patch Patch. v2.1Splinter Review
Just updated subject
Attachment #8373991 - Attachment is obsolete: true
Attachment #8374599 - Flags: review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S1 (14feb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: