Phone answer or hangs up when it rings and I take the phone out of my pocket When the phone rings and I pull it out of my pocket, most of the time it either hangs up or answers the call. I don't touch any buttons with my fingers. Sometimes it does this even before I start to take it out of my pocket. This is not in bluetooth mode. Phone is set to stay locked until I swipe the pattern or use fingerprint.
Ideally I want the phone to only answer when I explicitly tell it to do so.

Model SM-G930V
Android version 7.0
Ok, I dug a little deeper and read the user guide/manual for your phone. It might be some settings that are enabled in the accessibility settings, called Single Tap mode. Here is the link to the user guide. I included a screenshot of that section and added the text too.

 


  When an alarm sounds or a call comes in, tap the button to stop the
  alarm or answer the call instead of dragging the button.


On the Apps screen, tap Settings → Accessibility, and then tap the Single tap mode switch to activate it.  


  Change the method of answering or ending calls.


On the Apps screen, tap Settings → Accessibility → Answering and ending calls. Select the desired method.