Still getting cached last location even if the permission is denied in system settings after the application started
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
location-service (Ubuntu) |
Confirmed
|
High
|
Unassigned | ||
trust-store (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
With OTA5. Note that I don't know if the caching is done in location-service or is due to PositionSource Qt components.
1. Starts an application with location capability, accept the location permission
-> You have some console.log() callback on position changed
2. Without closing the app, go to system settings and disable location permission for that app
3. Put back your application in focus
-> You will still see regular (at updateInterval refresh) console.log() callback onPositionChanged, firing the same QGeoCoordinate than the last known one.
I guess it should send QGeoCoordinate(nan, nan, nan) (and should set the Error parameter) as when we can't theorically get the current position anymore.
----
snippet:
import QtPositioning 5.2
import QtLocation 5.3
PositionSource {
active: true
updateInterval: 120000 // 2 mins
onPositionC
}
}
Permissions to access the service are only checked whenever an app establishes a connection to the location service. In fact, the trust store should inform the service that permissions have changed, and the service should react accordingly. I will mark trust-store as affected, too.