Closed
Bug 1299454
Opened 9 years ago
Closed 9 years ago
Round Off Ambient Light Sensor event.value
Categories
(Firefox for Android Graveyard :: Data Providers, defect)
Tracking
(fennec51+, firefox51 fixed)
RESOLVED
FIXED
Firefox 51
People
(Reporter: lukasz.w3c, Assigned: droeh)
References
Details
(Keywords: mobile, privacy)
Attachments
(1 file)
|
1.01 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce:
User-Agent: Mozilla/5.0 (Android 6.0.1; Mobile; rv:49.0) Gecko/49.0 Firefox/49.0
I entered a web site registering devicelight events.
Actual results:
The event.value readout is too verbose:
75.2131500244140625 lx
435.8228149414062500 lx
548.1655883789062500 lx
13 lx
Expected results:
The event.value readout should be rounded:
75 lx
435 lx
548 lx
13 lx
Providing too verbose, non-rounded illuminance values can potentially open unexpected issues related to fingerprinting, tracking and data leaks (possibly similarly to http://lukaszolejnik.com/battery.pdf, but potentially more directly). It is also not necessary from a physical point of view. Please also see https://bugzilla.mozilla.org/show_bug.cgi?id=1124127
Updated•9 years ago
|
tracking-fennec: --- → ?
Comment 1•9 years ago
|
||
This comes after the over-precision of the BatteryStatus API returns in Mobile Firefox. (Bug: 1124127)
It would be great if FF mobile had a systematic way of assessing whether sensor API returns are overly-precise.
Assignee: nobody → droeh
| Assignee | ||
Comment 2•9 years ago
|
||
I can't actually reproduce this on a Nexus 6 running Android N (the values are already rounded to integers for me), but it's an easy enough fix regardless. This patch just rounds the event value before creating the DeviceLightEvent.
Attachment #8789500 -
Flags: review?(snorp)
Attachment #8789500 -
Flags: review?(snorp) → review+
I don't know if integer precision is still too much or not. Seems like it probably is, but this is a start.
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f41a22a14e0d
Round event value before creating a DeviceLightEvent. r=snorp
Comment 5•9 years ago
|
||
| bugherder | ||
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
tracking-fennec: ? → 51+
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•