Added a lock method for Android

Small fix