Your Android Marshmallow phone has a setting that determines the amount of time without a screen touch that the device will wait before automatically locking itself. This is a security precaution in the event that you forget to lock your device and leave it unattended.
There are several options available to you when determining how long your Galaxy On5 will wait before automatically locking. It is up to you to determine which option provides the best mix of convenience and security.
Step 1: Open the Apps folder.
Step 2: Select the Settings option.
Step 3: Tap the Lock screen and security button.
Step 4: Touch the Secure lock settings option.
Step 5: Select the Lock automatically option.
Step 6: Tap the amount of time that you would like your Android Marshmallow device to wait before it locks itself.
Learn how to turn off the passcode on your Galaxy On5 if you would like to make it easier to get into your phone.