Rename method

This commit is contained in:
himalia416
2025-10-10 16:50:26 +02:00
committed by Himali Aryal
parent 358108324e
commit 632cc6ca47
2 changed files with 4 additions and 4 deletions

View File

@@ -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
) {

View File

@@ -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
)