How deep is the issue? On the Apple Support Discussions forums, it's twenty pages deep. And counting. The details of this issue vary throughout the forum posts, but essentially the proximity sensor (the one that shuts down the screen functionality when your iPhone is close to your face or in your pocket) seems to be malfunctioning.
Some users report that the sensor does cause the screen to go black, as expected, but that the functionality of iPhone remains intact, causing anything from mid-call hangups to inadvertent three-way calling, accidental FaceTime initiation attempts, or muting calls.
The forum is flush with responses, "me too" comments, and suggestions for resolutions. The best advice for now is to sync your iPhone and backup your information. Perform a restore to your backup and see if that solves the issue. If it persists, do a restore and set your iPhone 4 up as a new phone. Keep in mind, this will not save your information (like text messages), so be sure to have them backed up elsewhere.
Should restoring your iPhone 4 not solve the proximity sensor issues, many users are reporting that contacting AppleCare (by phone at 1.800.APL.CARE) or visiting an AppleCare certified technician or the Genius Bar at an Apple Store to get their iPhone replaced has been a fairly painless process. iPhone 4 is still a new product and replacement supplies may be limited, so be sure to check your iPhone out quickly and take it in as soon as possible.
reading•iPhone 4 proximity sensor may be causing issues during calls
Sep 26•iPhone X is a sad joke, according to 'Silicon Valley' cast
Sep 25•Bill Gates goes Android, still won't use an iPhone
Sep 25•7 things to know before upgrading to MacOS High Sierra 10.13
Sep 25•Apple's Siri ditches Bing search for Google