From 500c99fbf6b051240b470a28d65db823840cd6ce Mon Sep 17 00:00:00 2001 From: Maximilian Goldschmidt Date: Mon, 12 Aug 2024 14:17:22 +0200 Subject: [PATCH] Try to catch changelog errors --- automotive/build.gradle | 2 +- .../com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt | 1 + .../java/com/ixam97/carStatsViewer/carApp/ChangesScreen.kt | 4 ++-- automotive/src/main/res/values/strings.xml | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/automotive/build.gradle b/automotive/build.gradle index 7724a930..622fbde9 100644 --- a/automotive/build.gradle +++ b/automotive/build.gradle @@ -22,7 +22,7 @@ android { minSdkVersion 29 targetSdkVersion 34 versionCode 260 - versionName "0.27.0.0049" + versionName "0.27.1.0000" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt index 10c05737..e2261c77 100644 --- a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt +++ b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt @@ -45,6 +45,7 @@ class CarStatsViewerSession : Session(), DefaultLifecycleObserver { if (CarStatsViewer.appPreferences.versionString != BuildConfig.VERSION_NAME) { screens.add(ChangesScreen(carContext)) + CarStatsViewer.appPreferences.versionString = BuildConfig.VERSION_NAME } var neededPermissions = permissions.filter { carContext.checkSelfPermission(it) != PackageManager.PERMISSION_GRANTED } diff --git a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/ChangesScreen.kt b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/ChangesScreen.kt index 4e103278..710025bc 100644 --- a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/ChangesScreen.kt +++ b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/ChangesScreen.kt @@ -45,8 +45,8 @@ class ChangesScreen(carContext: CarContext): Screen(carContext) { val changesRowList = mutableListOf() ChangeLogCreator.createChangelog(carContext).forEach { changesRowList.add(Row.Builder().apply { - setTitle(it.key) - addText(it.value) + setTitle(it.key.ifBlank { "THERE WAS AN ERROR CREATING CHANGELOG! Please get in touch with the developer via ixam97@ixam97.de" }) + addText(it.value.ifBlank { "THERE WAS AN ERROR CREATING CHANGELOG! Please get in touch with the developer via ixam97@ixam97.de" }) }.build()) } return changesRowList diff --git a/automotive/src/main/res/values/strings.xml b/automotive/src/main/res/values/strings.xml index 187b8468..7c75d06b 100644 --- a/automotive/src/main/res/values/strings.xml +++ b/automotive/src/main/res/values/strings.xml @@ -142,6 +142,9 @@ + (Play Edition) Fixed an issue where notification interactions would crash the app. + (Play Edition) Trying to catch crashes on changelog creation. + [V](0.27.1) CurrentTripData