Do you use magisk?
Thats make proximity sensor not working. I found a bug from magisk 16.00 make proximity crash.
Uninstall magisk 16 from magisk manager, reboot your phone. If you want to root, use magisk 15.4, this release work with mi5 oreo. Your proximity work too. But becarefull with any...