Closed
Bug 1204469
Opened 9 years ago
Closed 7 years ago
[FindMyDevice] Fix .lock's reliance on non-guaranteed settings observer callback sequence
Categories
(Firefox OS Graveyard :: FindMyDevice, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: cr, Unassigned)
References
Details
(Keywords: sec-want)
In https://mxr.mozilla.org/gaia/source/apps/findmydevice/js/commands.js#148 , FMD's lock function sets four settings:
150 var settings = {
151 'lockscreen.enabled': true,
152 'lockscreen.notifications-preview.enabled': false,
153 'lockscreen.passcode-lock.enabled': true,
154 'lockscreen.lock-immediately': true
155 };
It is absolutely crucial that the observer callbacks for 'lockscreen.enabled' and 'lockscreen.passcode-lock.enabled' have returned before the 'lockscreen.lock-immediately' observer callback is ultimately called, requesting to lock the device.
The callback sequence currently works as expected, but there is no guarantee that it will stay that way. To fix this before it breaks, the 'lock-immediately' setting should be wrapped into a separate promise and .then()-chained appropriately with the promise for the other settings.
Comment 1•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•