Skip to content

fix(chat): grant URI permissions on camera capture intents - #7061

Open
rapterjet2004 wants to merge 1 commit into
masterfrom
fix/missing-explicit-uri-grant
Open

rapterjet2004 wants to merge 1 commit into
masterfrom
fix/missing-explicit-uri-grant

Conversation

@rapterjet2004

@rapterjet2004 rapterjet2004 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

From Android 18 the system no longer auto-grants URI permissions for media capture intents carrying a URI. Without the flags the camera app cannot write the photo or video into the FileProvider URI we hand it, so photo/video capture from the chat and avatar camera capture break.

Add FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION to the ACTION_IMAGE_CAPTURE and ACTION_VIDEO_CAPTURE intents, and lower the lint baseline by 3 (reverting the temporary bump from #7015).

Assisted-by: Claude Code:claude-opus-4-8

🚧 TODO

  • Review it

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

From Android 18 the system no longer auto-grants URI permissions for
media capture intents carrying a URI. Without the flags the camera app
cannot write the photo or video into the FileProvider URI we hand it, so
photo/video capture from the chat and avatar camera capture break.

Add FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION to
the ACTION_IMAGE_CAPTURE and ACTION_VIDEO_CAPTURE intents, and lower the
lint baseline by 3 (reverting the temporary bump from #7015).

Assisted-by: Claude Code:claude-opus-4-8

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 80761bb
Version 7061
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings1713
Errors00

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance77
Security1111
Total7979

@rapterjet2004 rapterjet2004 self-assigned this Nov 18, 2026
@rapterjet2004
rapterjet2004 requested a review from mahibi November 18, 2026 14:37
@rapterjet2004 rapterjet2004 added the 3. to review Waiting for reviews label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Camera capture intents lack explicit URI grant flags (lint MissingExplicitUriGrant, AGP 9.5.0)

1 participant