Repository navigation
Fix documentation errors in Android.Speech and Android.Speech.Tts (R100, pass 3) - #1977
Merged
jonathanpeppers merged 2 commits intoNov 28, 2026
Conversation
… 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>
There was a problem hiding this comment.
🟢 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>
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Nov 28, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
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
deleted the
jonathanpeppers-review-android-speech-docs-r100-pass-3
branch
November 28, 2026 12:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
↑ 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.