Android had introduced heads up notification in Android Lollipop which Google thought would be a nice way to deal with notifications but it didn’t turn out to be the way it was supposed to be. Many users didn’t like it for many valid reasons but they could not do anything about it as they had no choice to disable it. But things have changed with Android M. Android M is all about giving users more controls over their devices and following this philosophy, Google has decided to allow the users to disable it and you can do it on app to app basis. Another change is that Android M has a new name for heads up notification, Peeking.
Let us know how do you find this improvement in the comments below.