|  |  | @ -338,10 +338,10 @@ class CallViewController: UIViewController, CallDelegate { | 
			
		
	
		
		
			
				
					
					|  |  |  |         let image = UIImage(named:imageName) |  |  |  |         let image = UIImage(named:imageName) | 
			
		
	
		
		
			
				
					
					|  |  |  |         let button = UIButton() |  |  |  |         let button = UIButton() | 
			
		
	
		
		
			
				
					
					|  |  |  |         button.setImage(image, for:.normal) |  |  |  |         button.setImage(image, for:.normal) | 
			
		
	
		
		
			
				
					
					|  |  |  |         button.imageEdgeInsets = UIEdgeInsetsMake(buttonInset(), |  |  |  |         button.imageEdgeInsets = UIEdgeInsets(top: buttonInset(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                                   buttonInset(), |  |  |  |                                               left: buttonInset(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                                   buttonInset(), |  |  |  |                                               bottom: buttonInset(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                                   buttonInset()) |  |  |  |                                               right: buttonInset()) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         button.addTarget(self, action:action, for:.touchUpInside) |  |  |  |         button.addTarget(self, action:action, for:.touchUpInside) | 
			
		
	
		
		
			
				
					
					|  |  |  |         button.autoSetDimension(.width, toSize:buttonSize()) |  |  |  |         button.autoSetDimension(.width, toSize:buttonSize()) | 
			
		
	
		
		
			
				
					
					|  |  |  |         button.autoSetDimension(.height, toSize:buttonSize()) |  |  |  |         button.autoSetDimension(.height, toSize:buttonSize()) | 
			
		
	
	
		
		
			
				
					|  |  | @ -486,19 +486,12 @@ class CallViewController: UIViewController, CallDelegate { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         self.callStatusLabel.text = textForState |  |  |  |         self.callStatusLabel.text = textForState | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // Show Incoming vs. (Outgoing || Accepted) call controls |  |  |  |         // Show Incoming vs. Ongoing call controls | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         let isRinging = callState == .localRinging |  |  |  |         let isRinging = callState == .localRinging | 
			
		
	
		
		
			
				
					
					|  |  |  |         for subview in allControls { |  |  |  |         incomingCallView.isHidden = !isRinging | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if isRinging { |  |  |  |         incomingCallView.isUserInteractionEnabled = isRinging | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 // Show incoming controls |  |  |  |         ongoingCallView.isHidden = isRinging | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 let isIncomingCallControl = incomingCallControls.contains(subview) |  |  |  |         ongoingCallView.isUserInteractionEnabled = !isRinging | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 subview.isHidden = !isIncomingCallControl |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Show ongoing controls |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 let isOngoingCallControl = ongoingCallControls.contains(subview) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 subview.isHidden = !isOngoingCallControl |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // Dismiss Handling |  |  |  |         // Dismiss Handling | 
			
		
	
		
		
			
				
					
					|  |  |  |         switch callState { |  |  |  |         switch callState { | 
			
		
	
	
		
		
			
				
					|  |  | @ -549,6 +542,8 @@ class CallViewController: UIViewController, CallDelegate { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     func didPressTextMessage(sender speakerphoneButton: UIButton) { |  |  |  |     func didPressTextMessage(sender speakerphoneButton: UIButton) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Logger.info("\(TAG) called \(#function)") |  |  |  |         Logger.info("\(TAG) called \(#function)") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         self.dismiss(animated: true) | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     func didPressAnswerCall(sender: UIButton) { |  |  |  |     func didPressAnswerCall(sender: UIButton) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -568,6 +563,8 @@ class CallViewController: UIViewController, CallDelegate { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     func didPressVideo(sender: UIButton) { |  |  |  |     func didPressVideo(sender: UIButton) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Logger.info("\(TAG) called \(#function)") |  |  |  |         Logger.info("\(TAG) called \(#function)") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // TODO: | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     /** |  |  |  |     /** | 
			
		
	
	
		
		
			
				
					|  |  | 
 |