https://kotlinlang.org logo
u

ursus

10/24/2018, 12:26 AM
Copy code
val shouldAcquireProximityWakeLock = when (callState) {
            is CallState.OutgoingPending,
            is CallState.Outgoing,
            is CallState.ConnectingPending,
            is CallState.Connecting,
            is CallState.Confirmed -> true
            else -> false
        } && !isVideo
something like this, notice the && at the end