We usually press the power button to lock our screen. This does not lock but it turns off the screen and when you press the power button back again it turns on and then you to swipe or type password or provide pattern for unlock. The phone screen is off automatically when it goes to sleep. By default we keep that for less than a minute. But sometime when we are working or using the phone and it keeps on going in sleep mode cause issue. You can increase the sleep time. Here the screen remains unlocked and there are chances that some one might touch it. Sony Xperia Z2 has a good app for that. It can block un-intentional touch without turning the screen off. The screen remain all on the time, but it is locked. You can keep that directly inside your bag or pocket and swipe to unlock the same. You don't have to wait to hold the power button and turn on the screen and then swipe back again to unlock the same. this is a handy tool to use when you are using the phone and does not want it to go in sleep fast.

Sony Xperia Z2 Screen Lock

Tap on the menu key to launch favorite bar.

Sony Xperia Z2 screen settings

Then tap on the lock icon with hand on it. A window appear with lock button.

Sony Xperia Z2 Homescreen

Tap on that to clock the screen. The screen is locked. and when you try to touch you can see the above screen. You can see notification but you cannot access them.

Sony Xperia Z2 touch lock

To unlock just swipe the lock icon from left side.