This app shows how to reproduce the black screen bug on incoming notifications.
To reproduce this issue perform the following steps:
-
Install and launch this app. Dragging down the notification drawer and showing a notification works as expected. Screenshots: Notifications ok, Notification drawer ok
-
Keep the app in foreground, lock the display and unlock it. Try to show the notification again. Now the rest of the screen is black. Dragging down the notification drawer also shows a black background. Screenshots: Notifications error, Notification drawer error
-
Put the app into background, lock and unlock the display. Now everything is ok.
Notice: In this case this issue only occurs when the activity has called setShowWhenLocked(true)
, see MainActivity.onCreate.