-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report a new location only after receiving a non-null update #77
Conversation
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This does not allow to use forced locations (primarily used for debugging currently, but might also be useful for automated testing in the future). Why don't you just verify that reportLocation is only called after the location was updated (i.e. location to be reported has newer timestamp than last report)? |
Additionally, report(null) is now different from report(old location) which should not be the case (no report, null report and old location report should all be treated the same as they all do mean that there is no new data available) |
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Signed-off-by: mvglasow <michael -at- vonglasow.com>
3b995b8 modifies For forced locations, eead0bd adds code to make them behave in a similar way as a location update from a backend: a forced location which is not more recent than the last forced location is silently discarded. When a new location is forced, |
@@ -78,12 +78,15 @@ public void bind() { | |||
} | |||
|
|||
public void update() { | |||
Boolean hasUpdates = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be boolean
instead of Boolean
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Fixed in 1093f40 |
Report a new location only after receiving a non-null update
Both of my backends are now causing a crash. From the trace back (below) it seems that I don't have the time set properly on the location report, but I am getting this even if I perform a myLocReport.setTime(System.currentTimeMillis()) immediately before calling report(myLocReport). I've taken a look at your Apple and Mozilla backends to see what you are doing differently and it appears that the setTime(System.currentTimeMillis()) call is what you use. Any ideas?
|
@n76: Use v1.6.4 |
I'm testing against GmsCore v0.2.2, listed as the latest in your downloads and just showing up in your F-Droid repository (I'm using F-Droid to keep up to date with your releases). FWIW, I am seeing the same crashes and similar stack traces on your Apple and Mozilla backends. |
Please try to download the app again (or update the f-droid repo) there was a broken build online for a few minutes. |
Apparently that was the problem. . . Not crashing now. Thanks! |
Prevents stale locations from being re-sent when backends supply null locations, fixes #75