Skip to content

[fix-finder] Add missing XML documentation to AndroidBitmapInfo struct in Android.Graphics #11361

@github-actions

Description

@github-actions

Problem

The Android.Graphics.AndroidBitmapInfo struct is a public type shipped in Mono.Android.dll, but none of its public members have XML documentation comments. This struct is used by developers working with Android's NDK bitmap operations and would benefit from clear documentation describing each property's purpose and the struct's relationship to the native [AndroidBitmapInfo]((developer.android.com/redacted) type.

Location

  • File: src/Mono.Android/Android.Graphics/AndroidBitmapInfo.cs

Current Code

public struct AndroidBitmapInfo : IEquatable<AndroidBitmapInfo> {

	internal uint width, height, stride;
	internal int format;
	internal uint flags;

	public uint Width {
		get {return width;}
	}

	public uint Height {
		get {return height;}
	}

	public uint Stride {
		get {return stride;}
	}

	public Format Format {
		get {return (Format) format;}
	}

	public override int GetHashCode () { ... }
	public override bool Equals (object value) { ... }
	public bool Equals (AndroidBitmapInfo value) { ... }
}

Suggested Fix

Add XML documentation comments to the struct and all its public members. Example:

/// <summary>
/// Provides information about the pixel buffer of an Android <see cref="Android.Graphics.Bitmap"/>.
/// This struct corresponds to the native <c>AndroidBitmapInfo</c> type from the Android NDK.
/// </summary>
/// <remarks>
/// <para>
/// Use this struct with <see cref="Android.Graphics.Bitmap"/> to inspect the dimensions,
/// stride, and pixel format of a bitmap's underlying pixel buffer.
/// </para>
/// <para>
/// See the <see href="(developer.android.com/redacted) NDK documentation</see>
/// for more information about the native type.
/// </para>
/// </remarks>
public struct AndroidBitmapInfo : IEquatable<AndroidBitmapInfo> {

	/// <summary>
	/// Gets the width of the bitmap in pixels.
	/// </summary>
	public uint Width { ... }

	/// <summary>
	/// Gets the height of the bitmap in pixels.
	/// </summary>
	public uint Height { ... }

	/// <summary>
	/// Gets the number of bytes between rows in the pixel buffer.
	/// </summary>
	public uint Stride { ... }

	/// <summary>
	/// Gets the pixel format of the bitmap.
	/// </summary>
	public Format Format { ... }

	/// <inheritdoc />
	public override int GetHashCode () { ... }

	/// <inheritdoc />
	public override bool Equals (object value) { ... }

	/// <summary>
	/// Determines whether the specified <see cref="AndroidBitmapInfo"/> is equal to this instance.
	/// </summary>
	/// <param name="value">The <see cref="AndroidBitmapInfo"/> to compare with this instance.</param>
	/// <returns><see langword="true"/> if the specified value is equal to this instance; otherwise, <see langword="false"/>.</returns>
	public bool Equals (AndroidBitmapInfo value) { ... }
}

Guidelines

  • Use standard .NET XML documentation conventions (<summary>, <param>, <returns>, <remarks>, <see cref="..."/>)
  • Reference the [Android NDK AndroidBitmapInfo documentation]((developer.android.com/redacted)
  • Use <inheritdoc /> for GetHashCode() and Equals(object) since they override System.Object methods
  • Do not modify the code logic — only add XML doc comments
  • Follow existing formatting: tabs for indentation, Mono style

Acceptance Criteria

  • All public members of AndroidBitmapInfo have XML documentation comments
  • The struct type itself has a <summary> and <remarks> section
  • GetHashCode() and Equals(object) use <inheritdoc />
  • Equals(AndroidBitmapInfo) has <param> and <returns> tags
  • No code logic changes — documentation only
  • No new warnings introduced

Generated by Nightly Fix Finder for issue #11352 · ● 4.3M ·

  • expires on May 21, 2026, 10:06 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions