1618cfeb26
- Add WidgetsBindingObserver mixin for app lifecycle tracking - Add overlay provider reference for background decision-making - Add state tracking: current accuracy, first-fix status, foreground/GPS active state - Fix default ProcessedGpsData to non-const with timestamp - Register lifecycle observer in initialize(), remove in dispose() - Set first-fix state and time after initial GPS fix - Update position handler to include timestamp in ProcessedGpsData - Implement precision switching with hysteresis (8/12 km/h thresholds) - Gate precision switching until 5s after first fix - Implement lifecycle handlers: paused (7s grace period) and resumed (restart GPS) - Add grace period expiration with race condition protection (re-check overlay) - Add GPS stop/restart methods preserving last known data - Implement conditional wake lock: GPS active AND (overlay OR foreground) - Cancel all timers in dispose() including background grace period - Remove unnecessary flutter/foundation import (widgets provides ChangeNotifier) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>