Merge lp:~thomas-voss/location-service/fix-settings-not-being-applied into lp:location-service/15.04

Proposed by Thomas Voß
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: 209
Merged at revision: 209
Proposed branch: lp:~thomas-voss/location-service/fix-settings-not-being-applied
Merge into: lp:location-service/15.04
Diff against target: 46 lines (+8/-6)
3 files modified
src/location_service/com/ubuntu/location/service/daemon.cpp (+1/-1)
src/location_service/com/ubuntu/location/service/implementation.cpp (+6/-4)
src/location_service/com/ubuntu/location/service/provider_daemon.cpp (+1/-1)
To merge this branch: bzr merge lp:~thomas-voss/location-service/fix-settings-not-being-applied
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+280041@code.launchpad.net

This proposal supersedes a proposal from 2015-12-09.

Commit message

Fix settings not being applied correctly.

Description of the change

Fix settings not being applied correctly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
--- src/location_service/com/ubuntu/location/service/daemon.cpp 2015-11-26 08:28:38 +0000
+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2015-12-09 15:21:25 +0000
@@ -181,7 +181,7 @@
181 trap->stop();181 trap->stop();
182 });182 });
183183
184 auto runtime = location::service::Runtime::create();184 auto runtime = location::service::Runtime::create(4);
185185
186 const location::Configuration empty_provider_configuration;186 const location::Configuration empty_provider_configuration;
187187
188188
=== modified file 'src/location_service/com/ubuntu/location/service/implementation.cpp'
--- src/location_service/com/ubuntu/location/service/implementation.cpp 2015-11-19 09:55:37 +0000
+++ src/location_service/com/ubuntu/location/service/implementation.cpp 2015-12-09 15:21:25 +0000
@@ -156,10 +156,12 @@
156 std::weak_ptr<session::Interface> session_weak{session_iface};156 std::weak_ptr<session::Interface> session_weak{session_iface};
157 session_iface->updates().position_status.changed().connect([this, session_weak](const session::Interface::Updates::Status& status)157 session_iface->updates().position_status.changed().connect([this, session_weak](const session::Interface::Updates::Status& status)
158 {158 {
159 cul::Optional<cul::Update<cul::Position>> last_known_position =159 cul::Optional<cul::Update<cul::Position>> last_known_position = configuration.engine->updates.last_known_location.get();
160 configuration.engine->updates.last_known_location.get();160 bool has_last_known_position = last_known_position ? true : false;
161 if (last_known_position &&161 bool is_session_enabled = status == culs::session::Interface::Updates::Status::enabled;
162 status == culs::session::Interface::Updates::Status::enabled)162 bool is_session_on_or_active = configuration.engine->configuration.engine_state != Engine::Status::off;
163
164 if (has_last_known_position && is_session_enabled && is_session_on_or_active)
163 {165 {
164 // Immediately send the last known position to the client166 // Immediately send the last known position to the client
165 if (auto session_iface = session_weak.lock())167 if (auto session_iface = session_weak.lock())
166168
=== modified file 'src/location_service/com/ubuntu/location/service/provider_daemon.cpp'
--- src/location_service/com/ubuntu/location/service/provider_daemon.cpp 2015-12-02 12:00:25 +0000
+++ src/location_service/com/ubuntu/location/service/provider_daemon.cpp 2015-12-09 15:21:25 +0000
@@ -112,7 +112,7 @@
112{112{
113std::shared_ptr<location::service::Runtime> runtime()113std::shared_ptr<location::service::Runtime> runtime()
114{114{
115 static const auto inst = location::service::Runtime::create(1);115 static const auto inst = location::service::Runtime::create(2);
116 return inst;116 return inst;
117}117}
118}118}

Subscribers

People subscribed via source and target branches