DO NOT MERGE - Allow locking with feature or permission am: 9ead5a3c05 am: 1c71776f9b am: 5f60fd793e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11739858

Change-Id: Ie1297b3aab73b8977f70c6271ed4c56e4959bcf8