Skip to content

Fix documentation errors in Android.Speech and Android.Speech.Tts (R100, pass 3) - #1977

Merged
jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-review-android-speech-docs-r100-pass-3
Nov 28, 2026
Merged

jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-review-android-speech-docs-r100-pass-3

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 28, 2026 •

Copy link
Copy Markdown
Member
### Agent assessment Self-reported assessment, not an independent review. Assessed revision: `35fd84ceeb2539e9312404cb9f309f7b498742ff` | Dimension | Assessment | Rationale | |---|---|---| | Change confidence | 9.5/10 | ↑ Four small text fixes, each tied to a pinned source line.
↑ Second gemini-4-argon review approved all four.
↑ XML parses; `git diff --check` is clean.
↓ OpenPublishing.Build result for the new head not yet inspected. | ## Scope Pass-3 review item R100: `Android.Speech` and `Android.Speech.Tts` (54 files). I reviewed every AI-changed channel (diff `86f7744a1..origin/main`) against the pinned Android SDK r01 sources and the pinned dotnet/android runtime source. Ledger: 511 of 511 channels have a row with a verdict, a source line, and a statement of what the current text says. Counts: 507 correct, 4 fixed. 97 of the correct rows are kickoff-deferred binding boilerplate (`JniPeerMembers`, `ThresholdClass`, `ThresholdType`, explicit `IJavaPeerable.UnregisterFromRuntime`). I checked each of them against pinned dotnet/android@9bc18c75 lines (generator `ClassInvokers.cs`, `XAPeerMembers.cs`, `JniPeerMembers.cs`, `AndroidRuntime.cs`); none is false, so none is changed. ## Fixes - `TextToSpeech.Engine.ServiceMetaData` remarks: raw `{@link android.R.styleable#TextToSpeechEngine tts-engine}` markup inside `` replaced with `<tts-engine>` (`TextToSpeech.java:376-379`). - `TextToSpeech.EngineInfo.Icon` value: the old text said the value is "0 if no icon resource is specified". For engines that the system reports, `TtsEngines.java:290` sets `icon = service.getIconResource()`, and `ComponentInfo.java:198-199` returns the application icon when the service has no icon. New text states this. - `RecognitionService.ServiceMetaData` remarks: raw `{@link android.R.styleable#RecognitionService ...}` markup replaced with `<recognition-service>` or `<on-device-recognition-service>` (`RecognitionService.java:62-67`). - `RecognitionService.SupportCallback(IntPtr, JniHandleOwnership)`, `transfer` param. The old text said "Specifies whether ownership of the JNI reference transfers to this instance." This is wrong. The type derives from `Java.Lang.Object`. The peer makes its own JNI reference; `transfer` selects deletion of the incoming reference and peer registration (dotnet/android@9bc18c75 `src/Mono.Android/Java.Lang/Object.cs:110-118`, `src/Mono.Android/Android.Runtime/JNIEnv.cs:360-393`). New text uses the #1941 wording. ## Uncertain findings and follow-ups (not changed) - 3-param `RecognitionService.OnCheckRecognitionSupport(Intent, AttributionSource, SupportCallback)` remarks do not say that this overload is available only from API 34 (the 2-param overload is API 33). This is missing information, not a false claim: no AI-changed text on that overload states or implies availability below API 34. Same as the non-blocking note on #1786. - `SpeechRecognizer.DetectedLanguage` summary is cut off at "BCP 47, e." This text is pre-AI, so it is out of scope for this pass. - `#DETECTED_LANGUAGE` could be a `cref`. Style only. ## Checks - Changed XML parses. - `git diff --check` is clean. - No new "To be added" placeholders. - Rubber-duck review (gemini-4-argon, confirmed in usage events) on `35fd84ce`: no findings.

… pass 3)

The transfer parameter does not transfer ownership to the instance. For
Java.Lang.Object peers, the runtime creates its own reference; transfer
selects release of the incoming reference and peer registration
(dotnet/android@9bc18c75 Object.cs:110-118, JNIEnv.cs:360-393).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 12:11
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for this documentation-only correction to the constructor’s transfer parameter description.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects the RecognitionService.SupportCallback constructor documentation as part of the Android speech API cleanup.

Changes:

  • Replaces the ownership-transfer claim with wording that describes JNI reference release and peer registration, consistent with the correction in #1941.
  • Makes no API or runtime behavior changes.
File Description
docs/​xml/​Android.Speech/​RecognitionService+SupportCallback.xml Corrects the constructor’s transfer parameter description.

Review effort: Balanced

- TextToSpeech.Engine.ServiceMetaData and RecognitionService.ServiceMetaData:
  replace raw {@link android.R.styleable#...} markup with tag names.
- TextToSpeech.EngineInfo.Icon: the system sets the service icon or the
  application icon; remove the unsupported 'or 0' claim.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the documentation-only clarifications to the Android speech recognition and text-to-speech bindings.

No open issues 🎉

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed all four documentation changes, their Android source behavior and JNI ownership wording. The XML corrections and engine-icon description are accurate; no blocking issues found.

@jonathanpeppers
jonathanpeppers merged commit 7b42354 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-android-speech-docs-r100-pass-3 branch November 28, 2026 12:56
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.

3 participants