Merge lp:~charlesk/indicator-location/lp-1435141-fix-false-state into lp:indicator-location/15.04
Status: | Merged |
---|---|
Approved by: | Antti Kaijanmäki |
Approved revision: | 150 |
Merged at revision: | 145 |
Proposed branch: | lp:~charlesk/indicator-location/lp-1435141-fix-false-state |
Merge into: | lp:indicator-location/15.04 |
Diff against target: |
355 lines (+135/-22) 9 files modified
debian/control (+1/-0) src/controller-mock.h (+7/-6) src/controller-ualc.cc (+34/-2) src/controller-ualc.h (+7/-4) src/controller.h (+5/-1) src/phone.cc (+22/-8) src/phone.h (+1/-0) tests/gtest-dbus-indicator-fixture.h (+7/-0) tests/phone-test.cc (+51/-1) |
To merge this branch: | bzr merge lp:~charlesk/indicator-location/lp-1435141-fix-false-state |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Antti Kaijanmäki (community) | Approve | ||
Review via email: mp+256332@code.launchpad.net |
Commit message
Try harder to keep in sync with platform-api backend and hide the indicator on startup until we know we're synced.
Description of the change
1. The platform-api backend takes awhile to start on some hardware. (Reported on tangxi project, also sometimes repeatable on krillin). Iff our first query to platform-api returns an error, set a timer to try again a few seconds later, and cancel the timer once we've got a successful query.
2. Add an is_valid bool property to Controller and have it be true iff we're able to succesfully talking to platform-api. Hide the indicator until is_valid becomes true, and also make the loc/gps menuitems disabled when is_valid is false so that testers can't mistakenly set a state that will be discarded.
3. Add unit tests to track these changes.
Tested on (1) krillin rtm r270 and (2) mako vivid r171
Approved.