Google introduced the Ambient display feature with the Google Marshmallow, copying Moto display feature. Ambient display basically shows all the notifications in a glance without completely turning on the screen.
All these days Ambient display used to activate when there' something moved on top of the proximity sensor, which was a kind of decent implementation. But with Android O, Google is taking it further.
In Android O, the ambient display with turn off by closing the proximity sensor. This would be really helpful. Although it may be irritating sometimes, it will be useful most of the time.
The feature would be rolled in Android O and some of the current Developer Preview owners of Android O are already experiencing the new feature.