← Back to team overview

ubuntu-phone team mailing list archive

Re: GSettings schemas for phone/tablet settings

 

On 13-07-19 08:57 AM, David Planella wrote:
> Al 18/07/13 18:32, En/na Marc Deslauriers ha escrit:
>> On 13-07-18 12:12 PM, Sebastien Bacher wrote:
>>> Le 18/07/2013 17:29, Marc Deslauriers a écrit :
>>>> FYI, App developers will not be able to use GSettings in the current version of
>>>> the SDK because of application confinement.
>>>
>>> Hey Marc,
>>>
>>> The specific usecase there is having the touch system settings application set
>>> up a few "system settings", that would include e.g:
>>> - the background image (read by unity8)
>>> - the ringtone (read by the phone-app)
>>> - things like "silent mode" that should be respected by a few applications
>>> (phone, messaging, ...)
>>>
>>> The gsettings restriction doesn't apply to the core applications, right? Which
>>> means we should be fine for what we have been doing?
>>
>> Yes, core applications that ship with the device, like unity, the phone-app,
>> etc. will be run unconfined. We'll probably confine some of the standalone core
>> applications though, such as the calculator.
>>
> 
> Hi Marc,
> 
> Some of the core apps (Clock and Weather are such examples) might need
> to get system-wide settings such as the current location or time zone
> (assuming that is stored in the system settings app).

GSettings is the wrong location for that. Current location and time zone
settings should be queried using dbus from org.freedesktop.timedate1, and the
GPS service (not sure where that is yet).

> 
> What's the guidance in these cases? For instance, does this seem correct?
> 
> - Use GSettings to read (*) the system-wide settings

There shouldn't be that many system-wide gsettings that are interesting for
applications. Most of them should be available using an API or via dbus.

> - Use Qt's LocalStorage to store in-app settings

Yes, that would be correct.

> 
> Note: when I'm talking about core apps in this context, I mean those
> developed by our community, many of which are already shipped in the
> default images:
> 
> https://launchpad.net/ubuntu-phone-coreapps

Yes, those are considered part of the core apps. If necessary, they can run
unconfined, but we'll attempt to confine most of them to protect the user's data
and privacy in case of security flaws.

> (*) Or write, if e.g. clock should be able to set the system-wide
> current location from within the app. Currently it stores it as an
> in-app setting.

Again, that should be done using the proper dbus org.freedesktop.timedate1
interface.

Marc.



Follow ups

References