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