B2G NFC: enable/disable NFC worker at runtime

RESOLVED FIXED in Firefox 28, Firefox OS v1.3

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dimi, Assigned: dimi)

Tracking

unspecified
1.3 C1/1.4 S1(20dec)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:1.3+, firefox27 wontfix, firefox28 fixed, firefox29 fixed, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

Details

Attachments

(2 attachments, 2 obsolete attachments)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
Blocks: 939056
(Assignee)

Comment 1

5 years ago
Created attachment 8343585 [details] [diff] [review]
Enable/Disable NFC according to system property

Enable NFC only when ro.moz.nfc.enabled system property is set to "true"
(Assignee)

Comment 2

5 years ago
Created attachment 8343600 [details] [review]
Mako specific nfc system property
Attachment #8343600 - Flags: review?(mwu)
(Assignee)

Updated

5 years ago
Attachment #8343585 - Flags: review?(allstars.chh)
Comment on attachment 8343585 [details] [diff] [review]
Enable/Disable NFC according to system property

Review of attachment 8343585 [details] [diff] [review]:
-----------------------------------------------------------------

Add r=me
Attachment #8343585 - Flags: review?(allstars.chh) → review+
(Assignee)

Updated

5 years ago
Attachment #8343585 - Attachment is obsolete: true
(Assignee)

Comment 4

5 years ago
Created attachment 8343660 [details] [diff] [review]
Enable/Disable NFC according to system property
(Assignee)

Updated

5 years ago
Attachment #8343660 - Flags: review?(allstars.chh)
Comment on attachment 8343660 [details] [diff] [review]
Enable/Disable NFC according to system property

Review of attachment 8343660 [details] [diff] [review]:
-----------------------------------------------------------------

oh, I already r+ on this so you don't have to send r? to me again.
Attachment #8343660 - Flags: review?(allstars.chh) → review+

Updated

5 years ago
Attachment #8343600 - Flags: review?(mwu) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(Assignee)

Updated

5 years ago
Attachment #8343660 - Attachment is obsolete: true
(Assignee)

Comment 6

5 years ago
Created attachment 8345703 [details] [diff] [review]
Enable/Disable NFC according to system property v2

Made some improvement for this patch
1. Remove defineLazyGetter because libcutils will always be used.
2. Move check NFC_ENABLED before calling XPCOMUtils.generateNSGetFactory.
Attachment #8345703 - Flags: review?(allstars.chh)
Attachment #8345703 - Flags: review?(allstars.chh) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Backed out for B2G mochitest-3 orange.
https://hg.mozilla.org/integration/b2g-inbound/rev/ae8513dfb00f

https://tbpl.mozilla.org/php/getParsedLog.php?id=31815826&tree=B2g-Inbound

09:21:55     INFO -  39153 INFO TEST-START | /tests/dom/bindings/test/test_bug707564.html
09:21:55     INFO -  ************************************************************
09:21:55     INFO -  * Call to xpconnect wrapped JSObject produced this error:  *
09:21:55     INFO -  [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: jar:file:///system/b2g/omni.ja!/components/nsNfc.js :: mozNfc :: line 142"  data: no]
09:21:55     INFO -  ************************************************************
09:21:55     INFO -  39154 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/bindings/test/test_bug707564.html | uncaught exception - NS_ERROR_FAILURE:  at http://mochi.test:8888/tests/dom/bindings/test/test_bug707564.html:17
09:21:55     INFO -  JavaScript error: http://mochi.test:8888/tests/dom/bindings/test/test_bug707564.html, line 17: NS_ERROR_FAILURE:
09:21:55     INFO -  39155 INFO TEST-INFO | MEMORY STAT vsize after test: 117841920
09:21:55     INFO -  39156 INFO TEST-INFO | MEMORY STAT residentFast after test: 63442944
09:21:55     INFO -  39157 INFO TEST-INFO | MEMORY STAT heapAllocated after test: 22978752
09:21:55     INFO -  39158 INFO TEST-END | /tests/dom/bindings/test/test_bug707564.html | finished in 1300ms
Re-pushed with a fix, was green locally:

https://hg.mozilla.org/integration/b2g-inbound/rev/c05f64192ce2
Whiteboard: [tarako]
https://hg.mozilla.org/mozilla-central/rev/c05f64192ce2
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

5 years ago
Hi Michael,
 Could you help merge the pull request for mozilla-b2g/device-mako, thanks !
Flags: needinfo?(mwu)
triage: ~3MB memory saving. 1.3+ to benefit tarako and the changes are small
blocking-b2g: --- → 1.3+
https://hg.mozilla.org/releases/mozilla-aurora/rev/90cf56c3fc35
status-b2g-v1.3: --- → fixed
status-firefox27: --- → wontfix
status-firefox28: --- → fixed
status-firefox29: --- → fixed
Flags: needinfo?(mwu)
Target Milestone: --- → 1.3 C1/1.4 S1(20dec)
(Assignee)

Comment 14

5 years ago
The pull request for mozilla-b2g / device-mako is not merged yet, could you help merge it ? Thanks
Flags: needinfo?(ryanvm)
Flags: needinfo?(mwu)

Comment 15

5 years ago
Merged.

For future reference, you can set checkin-needed on bugs to get the pull requests merged.
Flags: needinfo?(ryanvm)
Flags: needinfo?(mwu)
Ying, please add ro.moz.nfc.enabled=false on fugu and tarako.
(In reply to James Zhang from comment #16)
> Ying, please add ro.moz.nfc.enabled=false on fugu and tarako.

James, did that happen? It's not in my image from last week.
Flags: needinfo?(james.zhang)
status-b2g-v1.3T: --- → fixed
status-b2g-v1.3T: fixed → ---
(In reply to Fabrice Desré [:fabrice] from comment #17)
> (In reply to James Zhang from comment #16)
> > Ying, please add ro.moz.nfc.enabled=false on fugu and tarako.
> 
> James, did that happen? It's not in my image from last week.

Fabrice, we need not add this property to tarako. NFC is off by default.
Flags: needinfo?(james.zhang)
(In reply to James Zhang from comment #18)
> (In reply to Fabrice Desré [:fabrice] from comment #17)
> > (In reply to James Zhang from comment #16)
> > > Ying, please add ro.moz.nfc.enabled=false on fugu and tarako.
> > 
> > James, did that happen? It's not in my image from last week.
> 
> Fabrice, we need not add this property to tarako. NFC is off by default.

I'll check it with ttsai today.
You need to set that to let gecko know that there is no nfc support on the device and prevent it to instanciate some services.
use status-b2g-v1.3T?, remove [tarako] in whiteboard
status-b2g-v1.3T: --- → ?
Whiteboard: [tarako]
status-b2g-v1.3T: ? → fixed
status-b2g-v1.4: --- → fixed
You need to log in before you can comment on or make changes to this bug.