Aura v6.15.0 — Deep audit pass
Deep audit pass — 11 real bugs found in the v6.13–v6.14 deltas (AI wallpaper generation, Phase 6.2 dark/light auto-switch, Phase 6.4 adaptive tint, Phase 2.5 seasonal/Pexels). All fixes ship with unit-test regression nets. 248/248 unit tests green.
Data integrity (P0)
WeatherUpdateWorkerwas storing latitude/longitude withputLong(value.toLong())— silently truncating fractional degrees. A user at 39.7392° was stored as39, a user near the equator at 0.5° was stored as0. The reader then used thetintLat != 0.0 && tintLon != 0.0sentinel to gate adaptive tinting, so anyone within 1° of Null Island had tinting disabled entirely. Switched toputFloat(~7 sig figs, sub-meter precision) plus alocation_presentboolean sentinel. Reader falls back to the legacy Long keys for a single update cycle so existing installs don't lose tinting between upgrade and the next 30-min worker tick.
Correctness (P1)
SolarCalculator.sunTimesdefault UTC-offset arg usedTimeZone.getDefault().rawOffsetwhich ignores DST. Every region observing daylight saving had sunrise/sunset shifted by an hour for ~half the year, which the adaptive-tint phase math depends on. Switched togetOffset(System.currentTimeMillis()).
Battery + correctness (P1)
SystemThemeListener(Phase 6.2 new code) ran a 500 mswhile (true)polling loop that never stopped when the user disabled auto-switch and trapped the outer flow-collector. Replaced withComponentCallbacks.onConfigurationChanged— an actual event, delivered even while the app is fully backgrounded.
Reliability (P1)
SystemThemeListener.applyStoredWallpapercalledWallpaperApplier.applyFromUrl, which only speaks HTTP —OkHttp.Request.Builder().url(...)throwsIllegalArgumentExceptionforfile://orcontent://schemes. Users whose last applied wallpaper was AI-generated (file:/data/.../foo.png) silently lost auto-switch. NewWallpaperApplier.applyByLocatordispatches on scheme: http(s) → OkHttp path, file/content/absolute-path → bounded two-passBitmapFactorydecode withinSampleSizesampling.
Storage leak (P1)
AiWallpaperRepository.pruneOldFileswas defined but never called — the 50-image cap was a promise, not enforcement. Now invoked after every successful generation. Also sweeps stale.tmpfiles left by interrupted writes.
Thread safety + responsiveness (P1)
AiWallpaperViewModel.applyWallpaperdecoded the full-resolution PNG viaBitmapFactory.decodeFileon the Main coroutine context. Re-routed throughapplyByLocatorso the disk read + decode + sampling all happen onDispatchers.IO.
Structured concurrency (P2)
AiWallpaperRepository.generatewrapped the body inrunCatchingwhich capturesCancellationException. A back-navigation mid-generation was surfaced as a generic error message instead of a clean coroutine teardown. Switched to explicittry/catchwith cancellation rethrow.
Performance (P2)
WeatherWallpaperService.drawallocated a newColorMatrix+Paintevery frame at 30 FPS whenever adaptive tint was enabled (~30 allocations/sec under steady-state). Cached thePaintby 5-minute time bucket; also short-circuits to the no-tint draw path during the neutral-midday window.
UX (P2)
- Settings dark/light mode wallpaper slot opened an
AlertDialogonly when wallpaper history was non-empty — a fresh install / cleared history made the slot affordance a dead click. Now opens regardless and shows a "No wallpapers applied yet" explanatory empty state with guidance. VFX picker confirm button relabeled "Cancel" → "Close" since each radio click commits synchronously.
Error messages (P2)
AiWallpaperRepositorynow maps Stability AI HTTP codes (401/402/403/422/429/5xx) to actionable user copy ("API key invalid", "Out of credits", "Content policy", "Rate limited") instead of "Generation failed (HTTP 429): {raw JSON}".
Tests
- 30 new unit tests across
SolarCalculatorTest,AiWallpaperRepositoryFriendlyErrorTest,WallpaperLocatorSchemeTest. Fixed pre-existingSettingsViewModelTestfixture gap. 248/248 unit tests green.