Require pattern or password when user attempts to shutdown device from lock

Hey guys is there a way to intercept shut down to make the user enter password if the state is in the locked state? Its just that I am engineering an anti-theft app and would to disable shut down from lock screen while the device is in the locked state. Is there a way of achieving this with Android Java. I tried listening on the shut down intent but the device does not even give the code in the OnRecieve to execute