Closed
Bug 1060173
Opened 10 years ago
Closed 10 years ago
[PP] Initialize the settings
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(feature-b2g:2.2+)
RESOLVED
FIXED
feature-b2g | 2.2+ |
People
(Reporter: marta, Assigned: agnieszka.baranowska)
References
Details
(Keywords: privacy)
Attachments
(1 file)
Initialize the settings to defaults and store them in settingsDB
Summary: PP: Initialize the settings → [PP] Initialize the settings
Assignee | ||
Comment 1•10 years ago
|
||
SettingsDB is the same as device's settings. The Settings API is a way to access, change, and monitor changes to any settings. Example to access settings: var lock = navigator.mozSettings.createLock(); var setting = lock.get('wifi.enabled'); setting.onsuccess = function () { console.log('wifi.enabled: ' + setting.result); } setting.onerror = function () { console.warn('An error occured: ' + setting.error); } Example to change settings: var lock = navigator.mozSettings.createLock(); var result = lock.set({ 'wifi.enabled': true }); result.onsuccess = function () { console.log("the settings has been changed"); } result.onerror = function () { console.log("An error occure, the settings remain unchanged"); } Marta, please confirm (to have 100% certainty that we all say about the same).
Assignee | ||
Comment 2•10 years ago
|
||
Initialization of settings to defaults should run once, when user run application for the first time. As so far, we don't see need to initialize settings to defaults again. Initialization should be executed by invoking of JavaScript function (JavaScript file with this function should be part of privacy-panel app). Marta, please confirm.
Agnieszko, the settings should be preserved between resets of the app and the phone. This bug is to make sure that we have all of the elements declared in such a way that the appropriate fields are added to the settingsDB during build of the system. You are right - you should set it the same way I showed you at the begging. Nothing changes here. This patch should create the fields in settingsDB during the build.
Assignee | ||
Comment 4•10 years ago
|
||
QA Whiteboard: STATUS: not started → STATUS: ready for review
Priority: P3 → --
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
feature-b2g: --- → 2.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•