Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04c59c79 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "[35/n] InputEventReceiver.dispose() in Looper Thread" into main

parents d321f932 ad972e03
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -185,13 +185,17 @@ class LetterboxInputDetector(
        }

        fun stop(tx: Transaction) {
            handler.post(::resetInputState)
            inputSurface?.let { s ->
                tx.remove(s)
            }
        }

        private fun resetInputState() {
            receiver?.dispose()
            receiver = null
            inputChannel.dispose()
            windowSession.removeToken(inputToken)
            inputSurface?.let { s ->
                tx.remove(s)
            }
        }

        // Removes the provided token