I am developing a System App (i.e. an app signed with the device manufacturer's key) for non-rooted devices.
I need to prevent the user from shutting-down or rebooting the device.
If necessary and possible, disabling the power button completely would be a solution, though all I require is to be able to prevent the shut-down dialogue which appears when the power button is held-down.