Turning off the Camera Swipe after Lolipop

I was recently asked this question about Lockscreen Policy working on Lolipop.

With Lolipop, lockscreen widgets are deprecated. However, lockscreen policy enforcement should still work, but it’s has gotten a lot more complicated. The disable widgets flag is no longer valid.

Trying to run lockscreen policy results in the following error in logcat:
12-17 14:36:02.622: W/DevicePolicyManagerService(545): admin com.wordpress.chislonchow.deviceadminkeyguard has null trust agent feature set; all will be disabled

Trust agents provide automatic unlock capability to Android, such as face, bluetooth or proximity unlock. I haven’t looked more deeply into it, but it is going to take more work to understand the new lockscreen flags and the trust agent integration to set the flags to disable the lockscreen camera, which does look like it is possible to do, even if it as as drastic as turing off trust agents in the lockscreen altogether (setting KEYGUARD_DISABLE_TRUST_AGENTS to 0 bypasses this logic).

For more reading, see the Android developer reference docs for DevicePolicyManager.