Fix #1 Checking if device hasProximitySensorHardware before locking device