Comment 2 for bug 1551686

Revision history for this message
Alberto Mardegan (mardy) wrote :

I've been investigating the issue a bit. My understanding of the situation is that Chromium (used by oxide) keeps its own cache for last known location, and that's what it uses when the client plays with the "maximumAge" option; otherwise, it assumes that the location provider always returns new positions. The interface it offers to let developers implement custom location providers (and which oxide uses to implement its QtPositioning-based backend) is this one:

    https://chromium.googlesource.com/chromium/chromium/+/trunk/content/public/browser/location_provider.h

As you can see, it doesn't offer a way to let custom implementations specify a last known position.

Some time ago, I made a change to the location service which makes it always return the last known position as soon as a client starts requesting updates:

    http://bazaar.launchpad.net/~phablet-team/location-service/15.04/revision/204

The plan was to obfuscate that location update and also to decrease its accuracy as it ages (and indeed, not report a position at all if so much time has passed that the user could be anywhere now), but this hasn't been implemented yet.

Also, as this bug report says, we probably should not return a cached position to a client which has just been authorised to use the location service.