I mainly want to blank the screen in the recent apps list due to sensitive data being shown. For this, the solution is to use:
getWindow().addFlags(WindowMan
After doing some research I have found this to be impossible at this point.
The onCreateThumbnail
seems to be the function you're looking for. Unfortunately this function seems to be unimplemented or at least not working.
As Ped7g pointed out: The onCreateThumbnail is "won't fix" since 2014.
It's also flagged deprecated for removal in the Android onCreateThumbnail reference page
This functionality will most likely never work.