On Android, screen sharing triggers onPause/onResume

Did anyone notice it? My custom jitsi activity is in foreground, when I start sharing the screen, activity goes through onPause and onResume within 200ms.

Did anyone else notice it? Does anyone know why this happens? Is there a way to avoid it?


That might be due to the permission prompt, and would be normal in that case.

I do not get permission prompt, I grant the app capabilities from start, it is a system app in a custom ROM, in /system/priv-app. Do you think it is shown and hidden automatically?

I imagine that could be the case yeah.