It is not a trick but Google’s Nexus 7 is the first Android device with this features. What we are talking about is the magnet-enable sensor. With this sensor, the device will be automatically set to sleep by just placing magnet right at the place where sensor is located.
It is exactly the same as what we have seen on iPad’s Smart Cover. Of course Google didn’t list it on the specification section
by users have found this features and even release video proof on YouTube. The sensor is at the corner left of the device. You can watch the video below.