Repository navigation
Fix Android.Graphics documentation errors (R040, pass 3) - #1924
jonathanpeppers wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The extensive historical Android version boundaries and native graphics contracts could not be independently verified against pinned AOSP/SDK sources and require platform-maintainer validation.
No open issues 🎉
What changed in this PR
This documentation-only follow-up to #1727 refines the .NET Android.Graphics API reference to reflect managed binding semantics and Android version differences. It does not change runtime code or API declarations.
Changes:
- Clarifies native-reference handling, managed array copies, and writable properties.
- Corrects decoding, rendering, color-space, and geometry contracts, including version-specific behavior.
- Repairs managed API links, restores transfer-function equations, and removes stale documentation text.
| File | Description |
|---|---|
| docs/xml/Android.Graphics/Point.xml | Links the parcel creator to the managed point type. |
| docs/xml/Android.Graphics/PixelXorXfermode.xml | Clarifies when XOR behavior became inactive. |
| docs/xml/Android.Graphics/PixelFormat.xml | Clarifies stored bit and byte counts. |
| docs/xml/Android.Graphics/Picture.xml | Documents decoding failures and task faults. |
| docs/xml/Android.Graphics/PathIterator+Segment.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/PathIterator.xml | Documents end markers and allocation behavior. |
| docs/xml/Android.Graphics/Path.xml | Corrects interpolation weights and version-specific results. |
| docs/xml/Android.Graphics/ParcelableColorSpace.xml | Corrects parcel documentation wording. |
| docs/xml/Android.Graphics/PaintFlags.xml | Improves flag references and vertical-text guidance. |
| docs/xml/Android.Graphics/Paint.xml | Corrects font-metrics overload descriptions and links. |
| docs/xml/Android.Graphics/Outline.xml | Clarifies clipping support and removes an orphan parameter. |
| docs/xml/Android.Graphics/NinePatch.xml | Clarifies when the stored paint is null. |
| docs/xml/Android.Graphics/Movie.xml | Clarifies the GIF decoder’s opacity report. |
| docs/xml/Android.Graphics/MeshType.xml | Clarifies indexed triangle vertex reuse. |
| docs/xml/Android.Graphics/MeshSpecificationType.xml | Distinguishes attribute and varying type interpretations. |
| docs/xml/Android.Graphics/MeshSpecification+Varying.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/MeshSpecification+Attribute.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/MeshSpecification.xml | Corrects stride requirements and varying limits. |
| docs/xml/Android.Graphics/Mesh.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/Matrix44.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/Matrix.xml | Corrects inversion, shared identity, and return contracts. |
| docs/xml/Android.Graphics/LayerRasterizer.xml | Documents legacy behavior and later no-op implementations. |
| docs/xml/Android.Graphics/Interpolator+Result.xml | Qualifies results at exact key-frame times. |
| docs/xml/Android.Graphics/Insets.xml | Documents writable offsets and shared-instance mutability. |
| docs/xml/Android.Graphics/ImageFormatType.xml | Corrects packed row strides and image-plane references. |
| docs/xml/Android.Graphics/ImageFormat.xml | Corrects RAW14 row stride and plane references. |
| docs/xml/Android.Graphics/ImageDecoderMemoryPolicy.xml | Clarifies memory policies and configuration links. |
| docs/xml/Android.Graphics/ImageDecoderErrorType.xml | Documents conditions for gainmap error delivery. |
| docs/xml/Android.Graphics/ImageDecoderAllocator.xml | Clarifies hardware restrictions and animated drawable behavior. |
| docs/xml/Android.Graphics/ImageDecoder+Source.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/ImageDecoder+IOnPartialImageListener.xml | Clarifies partial-image acceptance and exception behavior. |
| docs/xml/Android.Graphics/ImageDecoder+ImageInfo.xml | Notes orientation-dependent dimensions and reference handling. |
| docs/xml/Android.Graphics/ImageDecoder+DecodeException.xml | Clarifies gainmap failure handling. |
| docs/xml/Android.Graphics/ImageDecoder.xml | Documents array copies, default listeners, and allocation limits. |
| docs/xml/Android.Graphics/HardwareRenderer+FrameRenderRequest.xml | Distinguishes frame submission, callbacks, and display visibility. |
| docs/xml/Android.Graphics/HardwareRenderer.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/HardwareBufferRenderer.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/Format.xml | Links deprecated constants to managed image-format equivalents. |
| docs/xml/Android.Graphics/Cursor.xml | Uses the managed paint method name. |
| docs/xml/Android.Graphics/ColorSpace+Rgb+TransferParameters.xml | Restores equations and explains their coefficients. |
| docs/xml/Android.Graphics/ColorSpace+Rgb.xml | Corrects wide-gamut criteria and wording. |
| docs/xml/Android.Graphics/ColorSpace+RenderIntent.xml | Distinguishes intended rendering intents from implemented behavior. |
| docs/xml/Android.Graphics/ColorSpace+Named.xml | Removes orphan captions and documents Oklab fallback. |
| docs/xml/Android.Graphics/ColorSpace+Connector.xml | Clarifies native-reference handling. |
| docs/xml/Android.Graphics/ColorSpace+Adaptation.xml | Corrects “adaptation” spelling. |
| docs/xml/Android.Graphics/ColorSpace.xml | Clarifies adaptation, named-space fallback, and gamut criteria. |
| docs/xml/Android.Graphics/ColorObject.xml | Corrects component indexing and packing descriptions. |
| docs/xml/Android.Graphics/ColorMatrix.xml | Documents managed copies and the 20-value assignment limit. |
| docs/xml/Android.Graphics/Canvas+EdgeType.xml | Identifies when edge choices became ignored. |
| docs/xml/Android.Graphics/Canvas.xml | Corrects legacy APIs, layer flags, drawing targets, and Z support. |
| docs/xml/Android.Graphics/BlendMode.xml | Corrects overlap, alpha, and color-result descriptions. |
| docs/xml/Android.Graphics/BitmapShaderFilterMode.xml | Uses managed filtering property and enum links. |
| docs/xml/Android.Graphics/BitmapFactory+Options.xml | Clarifies legacy options, output configuration, and dimensions. |
| docs/xml/Android.Graphics/Bitmap.xml | Corrects creation, color-space, recycling, and equality contracts. |
| docs/xml/Android.Graphics/AvoidXfermode+Mode.xml | Documents when historical blending modes became inactive. |
| docs/xml/Android.Graphics/AvoidXfermode.xml | Clarifies legacy constructor behavior and retained validation. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: At |
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
84ff0a32c4ef07ef00e01e8d17f33d9ddfd37f88↓ Historical device behavior and documentation publishing were not run locally; three uncertainties remain unchanged.
↓ Some historical release ranges were sampled rather than tested on devices.
Scope
Third-pass review item R040 in
Android.Graphics, after pass 2. I personally reviewed 999 of 999 in-scope changed Docs blocks, covering 2,185 of 2,185 channels in 116 assigned files. The inventory also found 157 blocks excluded by the campaign rules. This PR changes 272 channels in 56 files; 14 changed pre-AI channels correct contradictions within AI-changed blocks.Corrections and evidence
The pinned Android SDK source archive has SHA-256
9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84. Paths and line numbers below refer to files within that archive unless linked separately.Insetsfields, Java array-field wrappers, managed array copies, and managed member names. See field-property generation, array generation, JNI ownership, andsrc/android/graphics/Insets.java:36-77.Bitmapcolor-space, alpha initialization, nullable-copy, recycle, equality, and exception descriptions; correctBitmapShaderFilterModefiltering behavior. Seesrc/android/graphics/Bitmap.java,BitmapShader.java:55-82,216-223, and Android 8 Bitmap.BitmapFactory.Optionslegacy options, failure outputs, and reported dimensions. The Android 6 decoder, Android 7 decoder, and Android 17 decoder establish the checked behavior and version boundaries.ColorMatrixcopy semantics,ColorObjectcomponent and packing behavior,ColorSpacegamut checks and named-space fallback,Adaptation, and render intents. Remove captions for absent diagrams. SeeColorMatrix.java:86-118,Color.java:550-613,1040-1056,ColorSpace.java:892-923,1437-1448,2460-2485,3682-3685, and the Android 8 color-space implementation.Rgb.TransferParametersequations and describe the constructor coefficients. CorrectBlendModeoverlap, alpha, and color-component descriptions. SeeColorSpace.java:2460-2550and the Android 16 Skia blend stages.Matrixinversion, identity, concatenation, and pre/post transform return descriptions. See Android 5 Matrix, Android 17 Matrix, and Android 2.3.7 Skia.Canvaslegacy GL, clipping, save-layer flags, mesh target, and Z behavior. See Android 2.3.7 Canvas, Android 3.2 Canvas, Android 9 Canvas, andCanvas.javaandRecordingCanvas.javain the archive.Path.Interpolateweights, compatibility, empty-path behavior, and version-specific returns; correctPathIteratorend-marker documentation. See Android 14 Skia, Android 17 Skia, and Android 14 PathIterator.Outline.CanClipversion behavior and remove the orphanOuterShadowOnlyparameter. See Android 5, Android 12, and Android 13.Ubyte4interpretation, and indexed-triangle wording. SeeMesh.java:106-125,MeshSpecification.java:143-148, Android 14 Skia mesh, and Android 17 Skia mesh.ImageDecodersource-array ownership, default and partial listeners, allocator restrictions, orientation-dependent size, allocation limits, and gainmap error handling. SeeImageDecoder.java:224-236,653-658,814-844,1292-1327,1686-1702,1920-1946,2402-2413, the Android 17 implementation, and the installed Mono.Android 37.2.31 binding.Format,ImageFormatType, andPixelFormatdescriptions. SeeImageFormat.java:413-466,580-810,987-995,PixelFormat.java:110-146, and Android 4.0.3 PixelFormat.Paintfont-metrics overloads, locale metrics, cursor constants, and flag references. SeePaint.java:173-261,451-489,2390-2414and Android 15 Paint.Picture,Movie,Interpolator,NinePatch,Point, and parcel descriptions. See Android 6 AvoidXfermode, Android 7 AvoidXfermode, Android 7.1 LayerRasterizer, Android 8 LayerRasterizer, andNinePatch.java:143-164,Point.java:149-155, andParcelable.java:200-206.The campaign ledger records the member, channel, source lines, and checked fact for each reviewed channel.
Pass-2 recheck
Rechecked #1727 and its reviews. This PR resolves the managed
Insetssetter andOutline.OuterShadowOnlyorphan-parameter findings. Android 17 source still checksFlags.imageDecoderDefaultListener(); the CP2A release configuration enables it read-only. The earlier PR body's statement that the flag was absent from source was incorrect.Uncertain findings (unchanged)
ColorSpace.Rgb.GetMinValue(int)andGetMaxValue(int): the inherited annotation permits component indexes 0–3, while RGB has three components and the overrides ignore the argument. It is unclear whether to document the inherited annotation or valid RGB indexes. SeeColorSpace.java:1117-1138,3428-3439in the pinned archive.Matrixpre/post transform returns: Android 5 and later returntrueafter normal completion, but the earliest release where every operation does so is not established. The Android 3.2 wrapper returns native results; older Skia supports different scalar configurations. The documentation states the verified Android 5+ range.Checks
tools\importer.cs --self-testpassed;git diff --checkpassed.gemini-4-argonindependently reviewed the full diff and the final follow-up; no findings. The local usage log records the requested model.