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)
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S1 (14feb)
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 file, 2 obsolete files)
|
2.93 KB,
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → allstars.chh
Attachment #8373255 -
Flags: review?(dlee)
Comment 2•12 years ago
|
||
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)
| Assignee | ||
Comment 3•12 years ago
|
||
(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
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8373255 -
Attachment is obsolete: true
Attachment #8373991 -
Flags: review?(dlee)
Updated•12 years ago
|
Attachment #8373991 -
Flags: review?(dlee) → review+
| Assignee | ||
Updated•12 years ago
|
Summary: B2G NFC: Don't listen to nfc.enabled settings changed event → B2G NFC: Don't enable/disable NFC when nfc.enabled settings changed
| Assignee | ||
Comment 5•12 years ago
|
||
Just updated subject
Attachment #8373991 -
Attachment is obsolete: true
Attachment #8374599 -
Flags: review+
| Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
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.
Description
•