fix(android): preserve split SMS permission grants#99147
Conversation
ffcaa2d to
8694f29
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 2:15 PM ET / 18:15 UTC. Summary PR surface: Other +39. Total +39 across 2 files. Reproducibility: yes. Source inspection shows current main can request only the still-missing SMS permission, and AndroidX 1.13.0 returns callback maps keyed to requested/returned permissions, so omitted entries can preserve stale aggregate SMS state. 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:
Next step before merge
Security Review detailsBest possible solution: Land the focused onboarding permission-state merge after normal maintainer merge gating; no repair lane is needed. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main can request only the still-missing SMS permission, and AndroidX 1.13.0 returns callback maps keyed to requested/returned permissions, so omitted entries can preserve stale aggregate SMS state. Is this the best way to solve the issue? Yes. The PR fixes the bug inside the existing onboarding permission callback by making callback values authoritative and reading omitted required permissions from current Android state, without adding config, API, or product surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 826c84ea1942. Label changesLabel justifications:
Evidence reviewedPR surface: Other +39. Total +39 across 2 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
|
|
Maintainer verification Improved the SMS-specific patch into a reusable per-permission merge. Callback values remain authoritative when present; omitted entries query that permission's current Android state, so an explicit denial cannot be masked. Validation:
Proof gap: reaching the permission screen requires a paired Gateway. I did not bypass onboarding for a cosmetic screenshot; the actual split OS grants and callback merge boundary are the relevant proof. |
47c3e14 to
f396b68
Compare
|
Merged via squash.
|
* fix: preserve split SMS permission grants * refactor(android): generalize split permission grant merging --------- Co-authored-by: NianJiuZst <180004567+users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where Android third-party onboarding could keep showing SMS as unauthorized when users granted
SEND_SMSandREAD_SMSin separate permission prompts.Why This Change Was Made
ActivityResultContracts.RequestMultiplePermissionsonly reports the permissions included in the current launch result. The onboarding callback previously used the aggregatesmsGrantedvalue as the fallback for each SMS permission, so a callback that only includedREAD_SMScould discard the already-grantedSEND_SMSstate. This change merges SMS callback results against the current per-permission grant state instead.User Impact
Users who grant SMS permissions incrementally can complete the third-party onboarding SMS row once both SMS permissions are actually granted. Denied permissions still keep the row unauthorized until the missing permission is granted.
Evidence
androidx.activity:activity1.13.0RequestMultiplePermissionsmaps results from the launched permission list.cd apps/android && ./gradlew :app:testThirdPartyDebugUnitTest --tests ai.openclaw.app.ui.OnboardingFlowLogicTestcd apps/android && ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.OnboardingFlowLogicTestgit diff --check.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main --prompt "Scope: Android onboarding SMS permission state merge after rebase to current upstream/main. Review only the one-commit diff for split SEND_SMS/READ_SMS permission callback regressions."AI-assisted: yes.