Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/nightscout/AndroidAPS into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Jan 17, 2025
2 parents 2428b39 + f882261 commit d6c1e5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
addAlertScreen(rootKey)
addPreferencesIfEnabled(maintenancePlugin, rootKey)
}
initSummary(preferenceScreen, pluginName != null)
try {
initSummary(preferenceScreen, pluginName != null)
} catch (_: Exception) {
throw Exception("Error in onCreatePreferences pluginName=$pluginName customPreference=$customPreference rootKey=$rootKey filter=$filter")
}
preprocessPreferences()
if (filter != "") updateFilterVisibility(filter, preferenceScreen)
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ retrofit = "2.11.0"
kotlinx-serialization = "1.8.0"
kotlinx-coroutines = "1.10.1"
work = "2.10.0"
datastorePreferences = "1.1.1"
datastorePreferences = "1.1.2"
annotation = "1.9.1"

[plugins]
Expand Down Expand Up @@ -75,7 +75,7 @@ kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.6.1" }


androidx-activity = { group = "androidx.activity", name = "activity-ktx", version = "1.9.3" }
androidx-activity = { group = "androidx.activity", name = "activity-ktx", version = "1.10.0" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.7.0" }
androidx-biometric = { group = "androidx.biometric", name = "biometric", version = "1.1.0" }
androidx-browser = { group = "androidx.browser", name = "browser", version = "1.8.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ class GarminPlugin @Inject constructor(
/** Returns glucose values in Nightscout/Xdrip format. */
@VisibleForTesting
fun onSgv(uri: URI): CharSequence {
receiveHeartRate(uri)
val count = getQueryParameter(uri, "count", 24L)
.toInt().coerceAtMost(1000).coerceAtLeast(1)
val briefMode = getQueryParameter(uri, "brief_mode", false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import org.mockito.quality.Strictness
@MockitoSettings(strictness = Strictness.LENIENT)
class SPImplTest {

private val sharedPreferences: SharedPreferencesMock = SharedPreferencesMock()
@Mock lateinit var context: Context

private lateinit var sut: SPImpl
Expand All @@ -26,7 +25,7 @@ class SPImplTest {

@BeforeEach
fun setUp() {
sut = SPImpl(sharedPreferences, context)
sut = SPImpl(SharedPreferencesMock(), context)
Mockito.`when`(context.getString(someResource)).thenReturn("some_resource")
Mockito.`when`(context.getString(someResource2)).thenReturn("some_resource_2")
}
Expand Down Expand Up @@ -120,10 +119,6 @@ class SPImplTest {
assertThat(sut.getBoolean("test", false)).isTrue()
sut.putBoolean(someResource, true)
assertThat(sut.getBoolean(someResource, false)).isTrue()
sut.putString("string_key", "a")
assertThat(sut.getBoolean("string_key", true)).isTrue()
sut.putString(someResource, "a")
assertThat(sut.getBoolean(someResource, true)).isTrue()
}

@Test
Expand Down

0 comments on commit d6c1e5d

Please sign in to comment.