From 236f7f8e282322185c9967ed3c80d311b71cd21a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 11 Sep 2020 16:25:30 +0200 Subject: [PATCH] Private and typo --- .../app/features/call/VectorCallViewModel.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt index 97a6f72177..77a45628fe 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt @@ -91,23 +91,23 @@ class VectorCallViewModel @AssistedInject constructor( val proximityManager: CallProximityManager ) : VectorViewModel(initialState) { - var call: MxCall? = null + private var call: MxCall? = null - var connectionTimoutTimer: Timer? = null - var hasBeenConnectedOnce = false + private var connectionTimeoutTimer: Timer? = null + private var hasBeenConnectedOnce = false private val callStateListener = object : MxCall.StateListener { override fun onStateUpdate(call: MxCall) { val callState = call.state if (callState is CallState.Connected && callState.iceConnectionState == PeerConnection.PeerConnectionState.CONNECTED) { hasBeenConnectedOnce = true - connectionTimoutTimer?.cancel() - connectionTimoutTimer = null + connectionTimeoutTimer?.cancel() + connectionTimeoutTimer = null } else { // do we reset as long as it's moving? - connectionTimoutTimer?.cancel() + connectionTimeoutTimer?.cancel() if (hasBeenConnectedOnce) { - connectionTimoutTimer = Timer().apply { + connectionTimeoutTimer = Timer().apply { schedule(object : TimerTask() { override fun run() { session.callSignalingService().getTurnServer(object : MatrixCallback {