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
1=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
2--- src/location_service/com/ubuntu/location/service/daemon.cpp 2015-11-26 08:28:38 +0000
3+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2015-12-09 15:21:25 +0000
4@@ -181,7 +181,7 @@
5 trap->stop();
6 });
7
8- auto runtime = location::service::Runtime::create();
9+ auto runtime = location::service::Runtime::create(4);
10
11 const location::Configuration empty_provider_configuration;
12
13
14=== modified file 'src/location_service/com/ubuntu/location/service/implementation.cpp'
15--- src/location_service/com/ubuntu/location/service/implementation.cpp 2015-11-19 09:55:37 +0000
16+++ src/location_service/com/ubuntu/location/service/implementation.cpp 2015-12-09 15:21:25 +0000
17@@ -156,10 +156,12 @@
18 std::weak_ptr<session::Interface> session_weak{session_iface};
19 session_iface->updates().position_status.changed().connect([this, session_weak](const session::Interface::Updates::Status& status)
20 {
21- cul::Optional<cul::Update<cul::Position>> last_known_position =
22- configuration.engine->updates.last_known_location.get();
23- if (last_known_position &&
24- status == culs::session::Interface::Updates::Status::enabled)
25+ cul::Optional<cul::Update<cul::Position>> last_known_position = configuration.engine->updates.last_known_location.get();
26+ bool has_last_known_position = last_known_position ? true : false;
27+ bool is_session_enabled = status == culs::session::Interface::Updates::Status::enabled;
28+ bool is_session_on_or_active = configuration.engine->configuration.engine_state != Engine::Status::off;
29+
30+ if (has_last_known_position && is_session_enabled && is_session_on_or_active)
31 {
32 // Immediately send the last known position to the client
33 if (auto session_iface = session_weak.lock())
34
35=== modified file 'src/location_service/com/ubuntu/location/service/provider_daemon.cpp'
36--- src/location_service/com/ubuntu/location/service/provider_daemon.cpp 2015-12-02 12:00:25 +0000
37+++ src/location_service/com/ubuntu/location/service/provider_daemon.cpp 2015-12-09 15:21:25 +0000
38@@ -112,7 +112,7 @@
39 {
40 std::shared_ptr<location::service::Runtime> runtime()
41 {
42- static const auto inst = location::service::Runtime::create(1);
43+ static const auto inst = location::service::Runtime::create(2);
44 return inst;
45 }
46 }

Subscribers

People subscribed via source and target branches