Repository navigation
Fix Android.Media documentation errors (R061, pass 3) - #1943
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the Android.Media documentation updates.
No open issues 🎉
What changed in this PR
This documentation-only PR continues the Android.Media corrections from #1752, aligning .NET Android API guidance with managed bindings and Android behavior. It does not change API signatures or runtime code.
Changes:
- Corrects JNI reference handling, callback threading, routing behavior, and version-specific guidance.
- Clarifies playback-capture restrictions, incompatible usage-property bindings, and recording settings.
- Replaces Java-only names with managed documentation links and improves Parcelable, nullability, and channel descriptions.
| File | Description |
|---|---|
| docs/xml/Android.Media/DrmErrorCode.xml | Links DRM error guidance to managed APIs. |
| docs/xml/Android.Media/DirectPlaybackSupport.xml | Adds managed playback-support references. |
| docs/xml/Android.Media/ChannelOut.xml | Links channel diagrams and fixes punctuation. |
| docs/xml/Android.Media/ChannelIn.xml | Clarifies input-position mask restrictions. |
| docs/xml/Android.Media/CapturePolicies.xml | Scopes usage restrictions to playback capture. |
| docs/xml/Android.Media/CamcorderProfile.xml | Clarifies that profile duration is not applied automatically. |
| docs/xml/Android.Media/AudioTrackPerformanceMode.xml | Uses managed buffer-tuning API references. |
| docs/xml/Android.Media/AudioTrack+StreamEventCallback.xml | Clarifies JNI handling and links Stop. |
| docs/xml/Android.Media/AudioTrack+PeriodicNotificationEventArgs.xml | Documents nullable track values. |
| docs/xml/Android.Media/AudioTrack+MarkerReachedEventArgs.xml | Documents nullable track values. |
| docs/xml/Android.Media/AudioTrack+IOnRoutingChangedListener.xml | Clarifies nullability and routing bridge behavior. |
| docs/xml/Android.Media/AudioTrack+IOnPlaybackPositionUpdateListener.xml | Documents nullable callback parameters. |
| docs/xml/Android.Media/AudioTrack+CodecFormatChangedEventArgs.xml | Links the metadata key definitions. |
| docs/xml/Android.Media/AudioTrack+Builder.xml | Corrects JNI wording and managed API references. |
| docs/xml/Android.Media/AudioTrack.xml | Corrects threading, routing, version, and timestamp guidance. |
| docs/xml/Android.Media/AudioTimestamp.xml | Clarifies Parcelable creator and flag documentation. |
| docs/xml/Android.Media/AudioSource.xml | Links managed sources, streams, and permissions. |
| docs/xml/Android.Media/AudioRoutingOnRoutingChangedEventArgs.xml | Documents nullable routing objects. |
| docs/xml/Android.Media/AudioRecordingConfiguration.xml | Updates Parcelable references and flag wording. |
| docs/xml/Android.Media/AudioRecord+PeriodicNotificationEventArgs.xml | Documents nullable recorder values. |
| docs/xml/Android.Media/AudioRecord+MarkerReachedEventArgs.xml | Documents nullable recorder values. |
| docs/xml/Android.Media/AudioRecord+IOnRoutingChangedListener.xml | Clarifies nullability and routing bridge behavior. |
| docs/xml/Android.Media/AudioRecord+IOnRecordPositionUpdateListener.xml | Documents nullable callback parameters. |
| docs/xml/Android.Media/AudioRecord+Builder.xml | Clarifies privacy settings, construction, and API references. |
| docs/xml/Android.Media/AudioRecord.xml | Corrects callback threading and stopped-route guidance. |
| docs/xml/Android.Media/AudioProfile.xml | Clarifies JNI handling and Parcelable documentation. |
| docs/xml/Android.Media/AudioPresentation.xml | Updates Parcelable creator and flag references. |
| docs/xml/Android.Media/AudioPlaybackConfiguration.xml | Updates Parcelable creator and flag references. |
| docs/xml/Android.Media/AudioPlaybackCaptureConfiguration+Builder.xml | Describes filtering by usage rather than attributes. |
| docs/xml/Android.Media/AudioPlaybackCaptureConfiguration.xml | Documents incompatible scalar usage-property signatures. |
| docs/xml/Android.Media/AudioMixerAttributes.xml | Updates Parcelable creator and flag references. |
| docs/xml/Android.Media/AudioMetadata+IKey.xml | Clarifies Java value classes, including Boolean. |
| docs/xml/Android.Media/AudioMetadata+Format.xml | Clarifies bitrate semantics and JNI handling. |
| docs/xml/Android.Media/AudioManager+AudioRecordingCallback.xml | Corrects incoming JNI reference wording. |
| docs/xml/Android.Media/AudioManager+AudioPlaybackCallback.xml | Corrects incoming JNI reference wording. |
| docs/xml/Android.Media/AudioManager.xml | Corrects callback threading, version guidance, and references. |
| docs/xml/Android.Media/AudioFormat+Builder.xml | Updates channel-mask references and JNI wording. |
| docs/xml/Android.Media/AudioFormat.xml | Corrects constructor version guidance and Parcelable references. |
| docs/xml/Android.Media/AudioFocusRequestClass+Builder.xml | Clarifies callback threading and managed focus APIs. |
| docs/xml/Android.Media/AudioFlags.xml | Links managed low-latency configuration APIs. |
| docs/xml/Android.Media/AudioDeviceCallback.xml | Corrects incoming JNI reference wording. |
| docs/xml/Android.Media/AudioDescriptor.xml | Clarifies JNI handling and Parcelable documentation. |
| docs/xml/Android.Media/AudioAttributes+Builder.xml | Uses managed capture-policy, flag, and stream references. |
| docs/xml/Android.Media/AudioAttributes.xml | Updates Parcelable creator and descriptor references. |
| docs/xml/Android.Media/ApplicationMediaCapabilities+Builder.xml | Links managed HDR constants. |
| docs/xml/Android.Media/ApplicationMediaCapabilities.xml | Updates Parcelable creator and flag references. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: The reviewed AudioManager looper/version claims and managed-signature changes look consistent. I am carrying the remaining review into the next scheduled pass: complete untruncated paragraphs in AudioFlags, AudioRecord+Builder, AudioTrack+Builder, AudioTrackPerformanceMode, CapturePolicies, DirectPlaybackSupport and DrmErrorCode; the later Parcel/transfer edits; and source correspondence for AudioRecord.cpp/AudioTrack.cpp routing after stop, callback nullability and JNI transfer ownership. My earlier diff display truncated long lines; there was no source-fetch error. These are gaps in my reviewer coverage, not defects found in this PR. I have not yet completed the final whole-PR blocker pass. |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed the 46 Android.Media documentation changes, including managed references, callback/looper behavior, routing and JNI transfer semantics, against the managed signatures and relevant AOSP sources. The changes do not alter signatures or binding metadata. No blocking correctness issue found in static review.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
273d480f7b2b4fc322d79b44b0eae9f5f8854ebd↑ Independent Gemini review found no actionable issues.
↓ Android device behavior and published-page rendering were not tested.
↓ Four conflicting deprecation dates remain unchanged.
Scope
Third-pass review of the 107 Android.Media files in R061 against pre-AI commit
86f7744a1. I reviewed all 676 changed documentation blocks and recorded a personal verdict for each of their 1,188 changed channels. This PR changes 268 channels in 209 blocks across 46 files. Four additional channels have unresolved source conflicts and are unchanged.I also rechecked pass-2 #1752: it listed no uncertain findings, Copilot found no issues, and dalexsoto approved it. This pass corrects further version and routing details in that work.
Fixes and evidence
ExcludeUsagesandMatchingUsagesreturn signatures: the binding requests scalar()I, but Android declaresint[]. Correct the builder parameter descriptions to name usage values rather thanAudioAttributesobjects. Managed metadata, matching metadata, Android 10 source.AudioTrack.javain the SDK source archive below, lines 2383–2408 and 3820–3854.AudioFormatconstructor deprecation boundary, and managed enum references. AudioRecord, Android 2, AudioFormat, Android 5, andAudioFormat.javaandAudioRecord.javain the SDK archive.CamcorderProfile.Duration: setting a recorder profile does not apply its duration. MediaRecorder, Android 2.2, andMediaRecorder.javain the SDK archive, lines 836–847.The current source archive is Android SDK sources 37.2 r01, SHA-256
9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84. The bindings target r02; conflicting r02 facts were not replaced with r01 facts.Uncertain findings
The four
ChannelConfigurationfields below are unchanged. Android 2.0 AudioFormat.java already annotates them@Deprecated, whiledata/api-versions.xmlin the Android 37.2 r01 platform package reports API 15. The metadata file's SHA-256 is3cd2413cc3d1b285b1dff6d568116f351ae80c6274f3496e830e5669a9dd0ed9.DefaultInvalidMonoStereoChecks
System.Int32.git diff --check.gemini-4-argonreview of the committed diff: no actionable findings; the model was verified in local usage events.