positioning/ohos: Use repeating elapsed-time check for update timeout
The previous implementation fired UpdateTimeoutError via a one-shot
timer set to (intervalMs + 1000 ms), where intervalMs is derived from
std::max(updateInterval(), minimumUpdateInterval()). With the default
updateInterval() of 0 and minimumUpdateInterval() hardcoded to 1000 ms,
the timer expired after just 2 seconds -- before any position fix could
arrive during a GPS cold start.
Replace it with a repeating 30-second timer that measures elapsed time
since the last successful position fix. UpdateTimeoutError is raised
only when:
now - lastUpdateTime > updateInterval() + coldStartMarginMs (2 min)
The last-fix timestamp is refreshed on every successful position update,
and the timer is stopped in stopUpdates(). This tolerates the latency of
a cold GPS start while still detecting a genuine, sustained loss of
positioning signal.
The Android positioning backend uses the same technique.
Pick-to: 6.12
Change-Id: I52bbac86fe438473b7ef197ef6c3e2807e87ec39
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Zbigniew Chyla <zbigniew.chyla@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>