Move lock before unlock to Settings.Secure

Change-Id: I9f7104b6b7b17936fab02ea7ec102df821dc1ce1
Signed-off-by: iceandfire <arhamjamal@gmail.com>