Repository navigation
[codex] Support Android selected photo access - #98059
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 3:10 AM ET / 07:10 UTC. Summary PR surface: Other +62. Total +62 across 7 files. Reproducibility: yes. source-reproducible: current main targets SDK 36 and declares READ_MEDIA_VISUAL_USER_SELECTED, but the runtime and UI permission paths only check/request READ_MEDIA_IMAGES on API 33+. I did not run a live Android reproduction in this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this after the contributor adds redacted Android 14+ selected-photo proof, keeping one shared helper as the canonical request/check path across runtime and UI surfaces. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main targets SDK 36 and declares READ_MEDIA_VISUAL_USER_SELECTED, but the runtime and UI permission paths only check/request READ_MEDIA_IMAGES on API 33+. I did not run a live Android reproduction in this read-only review. Is this the best way to solve the issue? Yes, this appears to be the best narrow fix shape: centralize Android photo permission request/check logic and use it in the handler, device status, onboarding, and settings instead of keeping parallel one-off checks. The solution still needs real Android selected-photo proof before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 56c2d637d940. Label changesLabel justifications:
Evidence reviewedPR surface: Other +62. Total +62 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
a70fd8c to
c374a99
Compare
|
Android 16 emulator before/after proof on final rebased head Test state: third-party debug build with only Before — current
After — the same selected-only grant is recognized and shown as enabled on the live settings surface:
Interaction proof: toggling the granted Photos row opened Android app-info so the user can manage or revoke access. Runtime permission, Exact-head CI passed 48/48 jobs: https://github.com/openclaw/openclaw/actions/runs/28576179076 Known proof boundary: the emulator proves selected-only grant recognition and the reachable settings interaction; Thanks @NianJiuZst for identifying and implementing the Android selected-photo path. |
c374a99 to
db11e9f
Compare
|
Merged via squash.
|
* fix: support Android selected photo access * fix(android): expose selected photo access in settings --------- Co-authored-by: NianJiuZst <180004567+users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
* fix: support Android selected photo access * fix(android): expose selected photo access in settings --------- Co-authored-by: NianJiuZst <180004567+users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>


What Problem This Solves
Android 14 partial photo access can grant
READ_MEDIA_VISUAL_USER_SELECTEDwithout granting fullREAD_MEDIA_IMAGES. The Android app declared the selected-photo permission, but runtime checks and UI state only looked for the full image permission, so selected-only access still appeared denied andphotos.latestcould reject usable MediaStore access.Why This Change Was Made
This adds one shared photo permission helper for the Android app. API 34+ now requests both full-image and selected-photo permissions, and permission checks treat either grant as photo access. The helper is used by
photos.latest,device.permissions, onboarding, and settings so the status and request paths stay aligned.User Impact
Users who choose Android's selected-photos option can use the Android Photos capability with the selected library items instead of being treated as unpermitted. Settings/onboarding also reflect selected-photo access as granted and let users manage it afterward.
Evidence
Prepared on exact head
db11e9f0f3e24cf33d1e2eb31e5b468666b4204e.mainhad no Photos state on the reachable Phone Capabilities screen.Android 16 emulator state:
READ_MEDIA_VISUAL_USER_SELECTEDgranted;READ_MEDIA_IMAGESdenied. Tapping the enabled Photos row opened Android app-info for permission management.Commands run:
Results: focused permission/handler/dispatcher tests, ktlint, third-party debug assembly, native i18n validation, diff validation, and fresh autoreview passed. Exact-head GitHub CI passed 48/48 jobs: https://github.com/openclaw/openclaw/actions/runs/28576179076.
Known proof boundary: the emulator proves selected-only grant recognition and the reachable settings interaction.
photos.latestbehavior is covered by focused handler/dispatcher tests rather than a live MediaStore result.