Skip to content

Commit cb47f76

Browse files
authored
Merge pull request #525 from robotemi/dev_sprint_137_fix_rename_location_on_floor
fix renameLocationOnFloor
2 parents c53e1a1 + 1ffc9cc commit cb47f76

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android.defaults.buildfeatures.buildconfig=true
2525
android.nonFinalResIds=false
2626

2727
GROUP=com.robotemi
28-
VERSION_NAME=1.137.0.9-SNAPSHOT
28+
VERSION_NAME=1.137.0.10-SNAPSHOT
2929
POM_URL=https://github.com/robotemi/sdk/
3030
POM_SCM_URL=https://github.com/robotemi/sdk/
3131
POM_SCM_CONNECTION=scm:git:git://github.com/robotemi/sdk.git

sdk/src/main/java/com/robotemi/sdk/Robot.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,11 @@ class Robot private constructor(private val context: Context) {
728728
return true
729729
}
730730

731-
override fun onSequenceStepChanged(sequenceId: String, stepIndex: Int, totalSteps: Int): Boolean {
731+
override fun onSequenceStepChanged(
732+
sequenceId: String,
733+
stepIndex: Int,
734+
totalSteps: Int
735+
): Boolean {
732736
if (onSequencePlayStatusChangedListeners.isEmpty()) return false
733737
uiHandler.post {
734738
for (listener in onSequencePlayStatusChangedListeners) {
@@ -1565,10 +1569,12 @@ class Robot private constructor(private val context: Context) {
15651569
Log.w(TAG, "VERY_HIGH is not supported for follow speed, set to HIGH instead")
15661570
SpeedLevel.HIGH
15671571
}
1572+
15681573
SpeedLevel.VERY_SLOW -> {
15691574
Log.w(TAG, "VERY_LOW is not supported for follow speed, set to LOW instead")
15701575
SpeedLevel.SLOW
15711576
}
1577+
15721578
else -> speedLevel
15731579
}
15741580
val resp = sdkService?.setFollowSpeed(applicationInfo.packageName, level.value)
@@ -3845,7 +3851,7 @@ class Robot private constructor(private val context: Context) {
38453851
floorId,
38463852
oldLocationName,
38473853
newLocationName,
3848-
gson.toJson(layer?.roundByCategory())
3854+
layer?.let { gson.toJson(it.roundByCategory()) } ?: ""
38493855
) ?: 0
38503856
} catch (e: RemoteException) {
38513857
Log.e(TAG, "renameLocationOnFloor() error", e)
@@ -4103,7 +4109,7 @@ class Robot private constructor(private val context: Context) {
41034109
applicationInfo.packageName,
41044110
oldLocationName,
41054111
newLocationName,
4106-
gson.toJson(layer?.roundByCategory())
4112+
layer?.let { gson.toJson(it.roundByCategory()) } ?: ""
41074113
)?.toIntOrNull() ?: 0
41084114
Log.d(TAG, "renameLocation, result $resp")
41094115
return resp

0 commit comments

Comments
 (0)