If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[PP] Initialize the settings

RESOLVED FIXED

Status

Firefox OS
Gaia
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: marta, Assigned: agnieszka.baranowska)

Tracking

(Blocks: 1 bug, {privacy})

unspecified
All
Gonk (Firefox OS)
privacy
Dependency tree / graph

Firefox Tracking Flags

(feature-b2g:2.2+)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Initialize the settings to defaults and store them in settingsDB
(Reporter)

Updated

3 years ago
Summary: PP: Initialize the settings → [PP] Initialize the settings

Updated

3 years ago
Keywords: privacy
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → All
(Reporter)

Updated

3 years ago
QA Whiteboard: STATUS: ?
Priority: -- → P2
(Reporter)

Updated

3 years ago
QA Whiteboard: STATUS: ? → STATUS: not started
(Assignee)

Comment 1

3 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

3 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.
(Reporter)

Comment 3

3 years ago
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.
(Reporter)

Updated

3 years ago
Assignee: marta → agnieszka.baranowska
(Reporter)

Updated

3 years ago
Priority: P2 → P3
(Assignee)

Comment 4

3 years ago
Created attachment 8485707 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/23803
(Reporter)

Updated

3 years ago
QA Whiteboard: STATUS: not started → STATUS: ready for review
Priority: P3 → --
(Reporter)

Updated

3 years ago
Blocks: 1068017
(Reporter)

Updated

3 years ago
Blocks: 1069915
(Reporter)

Updated

3 years ago
Blocks: 1071042
(Reporter)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
feature-b2g: --- → 2.2+
You need to log in before you can comment on or make changes to this bug.