Hide a secure view completely in MediaProjection - android

android, android-mediacodec, android-mediaprojection, surfaceview

Solution

No way to do that currently unless you have System permission.

Problem

I'm creating a screen recorder app using the MediaProjection API. In my app, I'm showing the stop button as a small overlay window. I've kept this view as secure so that it doesn't come up in the final recorded video. This view doesn't come up in the final video, but the final output is itself a black area in place of the original view. Is it any way possible to get the final video output without this black area?

Original source