Skip to content

Fix Asterism RCS consent fallback without Gaia entry - #1

Open
keeltrace wants to merge 1 commit into
naormeit:rcs-bounty-2994from
keeltrace:keeltrace/2994-asterism-rcs-consent-fallback
Open

Fix Asterism RCS consent fallback without Gaia entry#1
keeltrace wants to merge 1 commit into
naormeit:rcs-bounty-2994from
keeltrace:keeltrace/2994-asterism-rcs-consent-fallback

Conversation

@keeltrace

Copy link
Copy Markdown

Problem

The Asterism getConsent implementation only reads matching gaia_consents.

For RCS requests without a matching Gaia/account consent entry, this causes the API to return NO_CONSENT even when the server response contains an RCS-specific consent value. The SetConsent implementation already sends RCS consent through the dedicated rcs_consent field.

Change

Preserve matching Gaia consent behavior, but when the caller is the RCS Asterism client and there is no matching Gaia entry, fall back to the server's RCS-specific consent. Non-RCS clients are unchanged.

Focused unit coverage verifies:

  • matching Gaia consent takes precedence
  • RCS consent is used when matching Gaia consent is absent
  • unrelated Gaia consent does not mask RCS consent
  • RCS consent is not reused for non-RCS clients
  • empty consent data falls back to NO_CONSENT

Why this matters

Consent is part of the RCS phone-number-verification acceptance path. Testing documented in microg#2994 showed that establishing RCS consent changed the server response from FAILED_PRECONDITION to a normal verification flow.

This change only corrects the Asterism read-side mapping. It does not claim to solve the remaining DroidGuard/Tachyon, carrier, or end-to-end RCS issues.

Prior work

This is a focused follow-up to the Constellation/Asterism implementation by @opstic in microg#3359 / microg#3360 and the integrated work in microg#3784.

Verification

Prepared and tested against naormeit/GmsCore:rcs-bounty-2994 at 063ccbea736763234b439f4a5802ccbe18e27649.

  • ./gradlew :play-services-asterism-core:testDebugUnitTest with ANDROID_HOME=/home/j/Android/Sdk: PASS — 5 tests, 0 failures, 0 errors
  • ./gradlew :play-services-asterism-core:lintDebug with the same SDK: PASS — no issues found
  • ./gradlew :play-services-asterism-core:assembleDebug with the same SDK: PASS — BUILD SUCCESSFUL
  • git diff --check: PASS

Limitations

No locked-bootloader device/SIM end-to-end RCS verification was performed. No claim is made that this patch alone completes RCS provisioning.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

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.

1 participant