mozilla/MozStumbler — pull request #1335 by garvankeeley (2014-12-08 23:42:12+00:00)
Title: Motion Detect: had an extra wait period for first GPS fix. This logic is of no value.

Removed this extra time window, and just use the existing time window,
called mPrefMotionChangeTimeWindowMs, in this code. The code is
cleaner with one time window (as it now has) instead of 2.

The reason the old code was not good, is that the extra time window to
wait for GPS fix is not any different than the existing motion change
time window, except that it was hard coded to 5 mins.

What would happen is that when scanning was started, and there is no GPS fix,
it would wait 5 mins before the motion detection logic would kick in.
This is confusing to anyone trying to understand the workings
of this code. It should be easy to grok based on the developer setting
(the setting for wait XXX seconds before pausing).

Not that we shouldn't have some logic to account for the fact the phone has not received a GPS fix, therefore if we pause due to no location change (and stop the GPS), then the phone won't get a fix, and it could get stuck in a paused state. With the default 120s timeout, the only circumstance where the GPS won't get a fix when sats are visible/fixable is when it has no AGPS, and no access to AGPS (for example, no functional SIM). This is case is exceedingly rare, and not handled. The user would be best to use Google Maps or similar to get a GPS lock, then switch to using the stumbler.