Android 5.0 Lollipop revamps the lock screen so you can see (and deal with) notifications without having to unlock your phone each time -- great! That also means that anyone who picks up your handset can have a browse through your notifications -- not so great! Here's how to make sure that nothing private shows up on the lock screen.
Set up a PIN or pattern
The option to hide sensitive information on the lock screen doesn't come into play unless you already have a PIN or pattern protecting your phone. If your phone can be unlocked with a tap or a swipe anyway, then there's not much point in trying to conceal alerts on the lock screen.
Head to the Settings app, either through the master list of apps or by dragging down from the top of the screen with two fingers and tapping on the cog icon. After that you want Security then Screen lock where you can set up a PIN, password or pattern to keep your data safe.
As soon as you introduce some form of protection on your phone, you'll be asked if you want to hide sensitive information from the lock screen -- at this point you can choose Hide sensitive notification content, although there's also the option to change the setting again in the future.
If you want to change the setting again in the future, or you forgot to set it first time, go back into the Settings app and choose Sound & notification. Under the Notification heading, tap When device is locked and then pick Hide sensitive notification content. You can also switch off lock screen notifications altogether if you want to.
It's not clear what Android considers "sensitive" by default. we saw text messages, emails and Dropbox activity blanked out, so all that was really visible from the lock screen was the name of the app itself. But if you want to control what's blanked out app-by-app, you can go to App notifications from the Sound & notification screen to toggle the Sensitive switch on or off.
This Sensitive switch will only appear if Android is currently configured to show all notification content, so you'll need to manually flick the slider for every app that you want to hide. It's a more long-winded way of achieving the same effect, but it does give you more control -- note that you can also block certain apps completely if you don't want them to show up on the lock screen at all.