Forward port of lock before unlock setting [2/2]

This is a work in progress, do not merge yet.
ps2: move to secure settings
ps3: missed one..
ps4: rebase

Change-Id: I6cf2ee9b2e13dcba883af7537018a38c9588f875