Disable the Stamina mode. By now it should work as normal. If it does then try the below to see if you can rectify the problem.
1. Go to phone app and key in *#*#7378423#*#* to get to service menu.
2. You should see a menu called service tests, open that and find proximity test.
3. Open it and if it shows you as ON, then you have a proximity issue.
4. Try to tap on the area where the proximity located gently and see if you can get it back on track. If it doesn't, your only choice is to go back to Sony service centre.
Did someone help you? Click on the THANKS button.
Don't look like a SILLY BILLY
Current: Sony Xperia Z2 | Android v4.4.2 | All Stock.
Current: Samsung Galaxy Note 3 | Android v4.4.2 | All Stock.
Backup: Sony Xperia Z | Android v4.3 | All Stock.
Still have: Sony Xperia S | Android v4.1.2 | All Stock.
Gifted: Xperia Arc | Android 4.0.4 | All Stock.
Previous: Xperia X10i | Sold.