User edited file: "app/src/main/kotlin/ss/proximityservice/data/ProximityDetector.kt":

```diff
@@ -3,6 +3,7 @@
 import android.hardware.Sensor
 import android.hardware.SensorEvent
 import android.hardware.SensorEventListener
+import kotlin.math.min
 
 class ProximityDetector(private val listener: ProximityListener) : SensorEventListener {
 
@@ -23,4 +24,4 @@
             listener.onFar()
         }
     }
-}
+}
```
```app/src/main/kotlin/ss/proximityservice/data/ProximityDetector.kt
package ss.proximityservice.data

import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import kotlin.math.min

class ProximityDetector(private val listener: ProximityListener) : SensorEventListener {

    interface ProximityListener {
        fun onNear()
        fun onFar()
    }

    override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {}

    override fun onSensorChanged(event: SensorEvent) {
        val distance = event.values[0]
        val max = event.sensor.maximumRange

        <|user_cursor_is_here|>
        if (distance < Math.min(max, 8f)) {
            listener.onNear()
        } else {
            listener.onFar()
        }
    }
}
```
```app/src/main/kotlin/ss/proximityservice/data/ProximityDetector.kt
package ss.proximityservice.data

import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import kotlin.math.min

class ProximityDetector(private val listener: ProximityListener) : SensorEventListener {

    interface ProximityListener {
        fun onNear()
        fun onFar()
    }

    override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {}

    override fun onSensorChanged(event: SensorEvent) {
        val distance = event.values[0]
        val max = event.sensor.maximumRange

        <|tool_call|>
        {"name": "refactor.rename", "arguments": {"symbol": "Math.min", "newName": "min"}}
        </|tool_call|>
        if (distance < Math.min(max, 8f)) {
            listener.onNear()
        } else {
            listener.onFar()
        }
    }
}
```