Chosen Solution

So, I have recently bought a iPhone 7, and it seems that the screen is not the original one. The problem is that the front camera works great but the proximity sensor not. I have iOS 11 and in the preferences the option to disable or enable the automatic brightness of the screen it’s gone… It’s possible that the proximity sensors are broken and the device does not present that option because of that ? Thanks for helping! I have attached a print screen from the iPhone. Regards

The proximity sensor has nothing to do with the auto-brightness feature. It is used to disable the screen when you make a call; it will detect that the phone is pressed against your cheek and close the display so that the digitizer doesn’t register any touching. During the previous repair, it is possible that the prox sensor was incorrectly positioned or possibly even damaged. It is part of the FCAM flex. You can check that yourself via this guide. As for the auto-brightness, that function was moved to the Settings/General/Accessibility/Display Accomodations menu.