From 632cc6ca47d5cf8169a03dcc1480952d62d25449 Mon Sep 17 00:00:00 2001 From: himalia416 Date: Fri, 10 Oct 2025 16:50:26 +0200 Subject: [PATCH] Rename method --- .../repository/channelSounding/ChannelSoundingManager.kt | 2 +- .../toolbox/profile/viewmodel/ChannelSoundingViewModel.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt index 461c5500..729f3cb1 100644 --- a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt +++ b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt @@ -140,7 +140,7 @@ internal class ChannelSoundingManager @Inject constructor( * @param updateRate The desired update rate for ranging measurements. Default is [UpdateRate.NORMAL]. */ @RequiresApi(Build.VERSION_CODES.BAKLAVA) - fun addDeviceToRangingSession( + fun startRangingMeasurement( device: String, updateRate: UpdateRate = UpdateRate.NORMAL ) { diff --git a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt index bbb4c690..dedb61bd 100644 --- a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt +++ b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt @@ -83,7 +83,7 @@ internal class ChannelSoundingViewModel @Inject constructor( }.launchIn(viewModelScope) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) { try { - channelSoundingManager.addDeviceToRangingSession(address, rate) + channelSoundingManager.startRangingMeasurement(address, rate) } catch (e: Exception) { Timber.e("${e.message}") } @@ -104,7 +104,7 @@ internal class ChannelSoundingViewModel @Inject constructor( viewModelScope.launch { if (_channelSoundingServiceState.value.updateRate != event.frequency) { channelSoundingManager.closeSession(address) { - channelSoundingManager.addDeviceToRangingSession( + channelSoundingManager.startRangingMeasurement( address, event.frequency ) @@ -131,7 +131,7 @@ internal class ChannelSoundingViewModel @Inject constructor( try { viewModelScope.launch { channelSoundingManager.closeSession(address) { - channelSoundingManager.addDeviceToRangingSession( + channelSoundingManager.startRangingMeasurement( address, _channelSoundingServiceState.value.updateRate )