Turn off screen when held to ear

// FREEBIE
This commit is contained in:
Michael Kirk 2017-03-07 11:17:21 -05:00
parent 61a3765cf7
commit 5ec8a24d34

View file

@ -123,13 +123,15 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
UIDevice.current.isProximityMonitoringEnabled = false
callDurationTimer?.invalidate()
callDurationTimer = nil
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
UIDevice.current.isProximityMonitoringEnabled = true
updateCallUI(callState: call.state)
}