Enabling PTT even when the phone is locked, and the screen off, is a very bad idea.
Your phone will turn on in your pocket, and randomly record what you are doing and send it via PTT. Next level pocket dialing.
The problem is in the hardware. Android phones are utterly stupid in this.
The old Nokia 5800 had a slider on the side, that you had to slide down, to unlock, and slide down again, to lock. It was beautiful. It never ever unlocked unless you wanted to. The spring in the slider was pretty strong. And the slider ridges were good for fingers but very slippery to any pocket lining or anything like that.
But everyone now has a *button* that only needs to be pressed shortly… which is pretty much guaranteed to happen when you e.g. sit down. Wasting battery. And then the phone and camera apps can be accessed without unlocking. Allowing calls and photos in your pocket. Who ever thought that was a good idea??
@Blackview: Can’t you make it, so that one has to push the power button AND the PTT button, to do PTT when locked and the screen is off? Similar for the camera. Because currently, one has to hold the camera button for so long, that pressing power and then starting the camera with a swipe is much quicker. Just do a two-button push, and it should be unlikely to accidentally unlock.
Hell, you could even do something like “Hold camera and power, then press PTT, for PTT.” And “Hold PTT and power, then press camera, for camera.” If the code checks for a right timing, that would be very secure to not unlock accidentially!