[SailfishDevel] GPS not turned off if app exits without stopping the GPS

Aaron McCarthy aaron.mccarthy at jolla.com
Mon Jan 13 07:38:38 UTC 2014


Hi,

On Mon, 13 Jan 2014 08:11:05 christopher.lamb at thurweb.ch wrote:
> I will call this a behaviour for the moment. Yesterday I noticed that
> if an app that uses the GPS exits without stopping the GPS, then the
> GPS remains running on the Jolla.

How did you confirm this? Presence of the Location icon on the lock screen?

> I compared this to my Nokia N9. On that device if an app using the GPS
> exits (e.g. the user closes it), then the GPS stops soon after that
> app has exited (even if the app does not explicitly shut the GPS down).
> 
> On the N9 this even works with multiple apps open using the GPS. In
> this test, when the last GPS-consuming app exits, the GPS shuts down.

This is expected to work. Both the Geoclue master and the provider processes 
monitor DBus disconnections and will clean up any associated interfaces. The 
provider processes will then close 30 seconds after there are no more 
connections.

How to test that geoclue-master is working:

Run

/usr/lib/qt5/bin/qdbus org.freedesktop.Geoclue.Master | grep 
'/org/freedesktop/Geoclue/Master/client' | wc -l

to see how many processes have started positioning.

Run the above command, expect 0
Run sailfish-maps
Run the above command, expect 1
pkill -9 sailfish-maps
Run the above command, expect 0

It is harder to test this functionality in the providers as the number of 
connections are not readily available.

Can you check whether there are any client interfaces exported by geoclue-
master with the above command. Also what geoclue processes are running (ps aux 
| grep geoclue).

Cheers,

-- 
Aaron McCarthy


More information about the Devel mailing list