Skip to content

Restrict screen capture and audio recording in PlayerActivity#1

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/restrict-audio-recording
Draft

Restrict screen capture and audio recording in PlayerActivity#1
Copilot wants to merge 2 commits intomasterfrom
copilot/restrict-audio-recording

Conversation

Copy link

Copilot AI commented Feb 28, 2026

Media content in PlayerActivity was unprotected — screen recording tools could capture both video and audio output from the player.

Changes

  • PlayerActivity.kt: Set FLAG_SECURE on the window before super.onCreate() to block screen capture and recording of the player surface.
override fun onCreate(savedInstanceState: Bundle?) {
    enableEdgeToEdge()
    window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
    super.onCreate(savedInstanceState)
    ...
}

FLAG_SECURE causes the window to render as blank in any screen recording or recent-apps thumbnail, covering both visual and audio capture via screen recording APIs.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…LAG_SECURE

Co-authored-by: Karthik-0 <41418580+Karthik-0@users.noreply.github.com>
Copilot AI changed the title [WIP] Restrict audio recording in activity Restrict screen capture and audio recording in PlayerActivity Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants