AAOS: fix crash when no navigation app is installed

This commit is contained in:
johan12345
2024-05-29 20:09:31 +02:00
parent 65fa54ef36
commit b9354e77a9

View File

@@ -549,7 +549,11 @@ class ChargerDetailScreen(ctx: CarContext, val chargerSparse: ChargeLocation) :
CarContext.ACTION_NAVIGATE,
Uri.parse("geo:${coord.lat},${coord.lng}")
)
carContext.startCarApp(intent)
try {
carContext.startCarApp(intent)
} catch (e: UnsupportedOperationException) {
CarToast.makeText(carContext, R.string.no_maps_app_found, CarToast.LENGTH_SHORT).show()
}
}
private fun loadCharger() {