Modern Apps git

← Modern-Apps.git

maauto: fix cross-module smart cast on mirror route

Commit
f31c7137934106348e6721d97a520a7cabce57bc
Author
vayun-mathur <[email protected]>
When
2026-09-12 23:38 UTC (2 months ago)
Parents
f9b54b1

Diff

auto/src/main/java/com/vayunmathur/auto/platform/CarMapsMirror.kt
diff --git a/auto/src/main/java/com/vayunmathur/auto/platform/CarMapsMirror.kt b/auto/src/main/java/com/vayunmathur/auto/platform/CarMapsMirror.ktindex 7d5a8b08fb..c774a24f9f 100644--- a/auto/src/main/java/com/vayunmathur/auto/platform/CarMapsMirror.kt+++ b/auto/src/main/java/com/vayunmathur/auto/platform/CarMapsMirror.kt@@ -137,9 +137,10 @@ class CarMapsMirror(         active.setUserPuck(             UserPuck(position = position, bearing = snapshot.bearingDeg),         )-        val navigating = snapshot.guidanceActive && snapshot.route != null-        if (navigating) {-            val points = snapshot.route.map { GeoPoint(it.longitude, it.latitude) }+        val route = snapshot.route+        val navigating = snapshot.guidanceActive && route != null+        if (navigating && route != null) {+            val points = route.map { GeoPoint(it.longitude, it.latitude) }             // Identity gate: the monitor forwards the provider's list             // untouched, so an unchanged route skips the tessellation.             if (points !== pushedRoute) {