Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Summary

  • allow Android media playback to reuse content URIs by persisting picker grants and falling back to descriptor playback
  • request READ_MEDIA_* manifest permissions only when media playback APIs are detected or explicitly requested

Testing

  • not run (not available in container)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 3624 to 3629
// The document picker grants temporary permissions for content URIs. Requesting
// READ_EXTERNAL_STORAGE again would surface a redundant prompt on Android 13+, so we only
// ask for classic file paths that require the legacy permission.
if(!isContentUri && !uri.startsWith(FileSystemStorage.getInstance().getAppHomePath())) {
if(!PermissionsHelper.checkForPermission(isVideo ? DevicePermission.PERMISSION_READ_VIDEO : DevicePermission.PERMISSION_READ_AUDIO, "This is required to play media")){
return null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skipping READ_MEDIA runtime prompt for MediaStore content URIs

The new logic avoids requesting any runtime permission whenever the URI scheme is content://. That works for document-picker grants, but it also suppresses the previous PermissionsHelper.checkForPermission() call for MediaStore URIs such as content://media/external/..., which still require READ_MEDIA_*/READ_EXTERNAL_STORAGE when no temporary grant was provided. Before this change createMedia() asked for the permission and playback succeeded; now it returns an error once MediaPlayer.create() hits a SecurityException. Apps that pass a MediaStore URI without having asked for the permission themselves will silently regress.

Useful? React with 👍 / 👎.

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Nov 14, 2025

Android screenshot updates

  • BrowserComponent — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    BrowserComponent
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

@shai-almog shai-almog merged commit 777739b into master Nov 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants