Skip to content

Commit

Permalink
proximity: clear listeners on stop
Browse files Browse the repository at this point in the history
This change does not really have an effect,
but it is cleaner.
  • Loading branch information
mwarning committed Apr 1, 2023
1 parent fc4607e commit fc4ede0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class RTCProximitySensor(context: Context) : SensorEventListener {
/** Deactivate the proximity sensor. */
fun stop() {
threadChecker.checkIsOnValidThread()
onSensorStateListeners.clear()
Log.d(this, "stop() ${Utils.getThreadInfo()}")
if (proximitySensor != null) {
Log.d(this, "stop() unregisterListener")
Expand Down

0 comments on commit fc4ede0

Please sign in to comment.