[libcolorcorrect] Send auto location updates only when desirable
ClosedPublic

Authored by romangg on Dec 15 2017, 7:05 PM.

Details

Summary

Instead of always sending auto location updates through our daemon query the current running and mode states of KWin and only send it when running is true and mode is zero, i.e. automatic location and time updates.

This is primarily meant as an improvement for deployments in sensitive operation areas, where connections to external sources (even like in our case anonymously via mozilla location service or if available gps) might be unwanted.

Another future improvement might be to only launch the daemon on demand, i.e. let KWin ask for this via dbus through KDED's functionality when automatic mode is activated (either at startup or per config change).

Test Plan

Manually with and without automatic location updates. I failed writing an autotest because of KDED and DataEngine internals, where I was not able to mock most of this external functionality (it compiled but on executing it still tried to use the external libs for some reason, which gave memory corruptions). Just using the external libs lead to non-meaningful results because it was at no point using the available internet connection in the test. If somebody has a tip how I could make this work I'll gladly rewrite my autotest attempt.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Dec 15 2017, 7:05 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 15 2017, 7:05 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
romangg requested review of this revision.Dec 15 2017, 7:05 PM
mart accepted this revision.Jan 8 2018, 11:06 AM
This revision is now accepted and ready to land.Jan 8 2018, 11:06 AM
This revision was automatically updated to reflect the committed changes.