How to handle heads up notifications in Android lollipop

Hello ,
While i am simulating the user actions on Android lollipop, a heads up notification appears and apparently the heads up notification gets clicked which was not intended.

I have also tried to handle heads up notification, but ui automator is not able to capture the device screenshot and an error appears. Please see the attached screenshot of the error.

I have even tried to turn off the heads up notifications in android settings, but that requires a third party app say Heads Off, which i want to ignore.

Are there any methods implemented in appium to handle the heads up notifications or is there any other work around for the same?
Please help !!!
@jlipps @bootstraponline

Create a ticket here asking for this feature