How to enable device lock?