Problem
The two public convenience overloads in src/Mono.Android/Android.Views/KeyCharacterMap.cs ship in Mono.Android.dll but have no XML documentation. KeyCharacterMap is a developer-facing input-handling type, so IntelliSense docs describing the behavior, parameters, and return values would help consumers. Both methods are managed overloads that accept the meta-key state as an int and delegate to the strongly-typed MetaKeyStates overloads, so they have no base/interface documentation to inherit.
Location
- File(s):
src/Mono.Android/Android.Views/KeyCharacterMap.cs
- Line(s):
Get at line 5; GetMatch at line 10
Current Code
namespace Android.Views {
partial class KeyCharacterMap {
public int Get (Keycode keyCode, int metaState)
{
return Get (keyCode, (MetaKeyStates) metaState);
}
public char GetMatch (Keycode keyCode, char[] chars, int metaState)
{
return GetMatch (keyCode, chars, (MetaKeyStates) metaState);
}
}
}
Suggested Fix
Add /// XML doc comments above each of the two public methods only. Do not change any code, signatures, or behavior, and do not add #nullable enable. Use tabs for indentation to match the file. The result should look like:
namespace Android.Views {
partial class KeyCharacterMap {
/// <summary>
/// Gets the Unicode character generated by the specified key and meta key state combination.
/// </summary>
/// <param name="keyCode">The key code.</param>
/// <param name="metaState">A combination of <see cref="MetaKeyStates"/> values, expressed as an integer.</param>
/// <returns>The Unicode character (code point) produced by the key, or <c>0</c> if the key does not produce a character.</returns>
/// <seealso href="(developer.android.com/redacted),%20int)">Android documentation for <c>android.view.KeyCharacterMap.get</c></seealso>
public int Get (Keycode keyCode, int metaState)
{
return Get (keyCode, (MetaKeyStates) metaState);
}
/// <summary>
/// Gets the first character in <paramref name="chars"/> that can be generated by the specified key code.
/// If there are multiple choices, prefers the one that would be generated with the specified meta key modifier state.
/// </summary>
/// <param name="keyCode">The key code.</param>
/// <param name="chars">The array of characters to match against.</param>
/// <param name="metaState">A combination of <see cref="MetaKeyStates"/> values, expressed as an integer.</param>
/// <returns>The matching character, or the null character (<c>'\0'</c>) if no match was found.</returns>
/// <seealso href="(developer.android.com/redacted),%20char[],%20int)">Android documentation for <c>android.view.KeyCharacterMap.getMatch</c></seealso>
public char GetMatch (Keycode keyCode, char[] chars, int metaState)
{
return GetMatch (keyCode, chars, (MetaKeyStates) metaState);
}
}
}
Guidelines
- Follow the existing XML-doc style already used in
src/Mono.Android/Android.Util/Log.cs (<summary>, <param>, <returns>, <seealso href>), using tabs for indentation.
- Comment-only change: do not alter signatures, logic,
using directives, or add #nullable enable.
MetaKeyStates is in the same Android.Views namespace, so the <see cref> references resolve without a qualifier.
Acceptance Criteria
Fix-finder metadata
- Script:
04-missing-xml-docs
- Score:
29/30 (actionability: 10, safety: 10, scope: 9)
Generated by Nightly Fix Finder · 299.5 AIC · ⌖ 50.3 AIC · ⊞ 40.8K · ◷
Problem
The two public convenience overloads in
src/Mono.Android/Android.Views/KeyCharacterMap.csship inMono.Android.dllbut have no XML documentation.KeyCharacterMapis a developer-facing input-handling type, so IntelliSense docs describing the behavior, parameters, and return values would help consumers. Both methods are managed overloads that accept the meta-key state as anintand delegate to the strongly-typedMetaKeyStatesoverloads, so they have no base/interface documentation to inherit.Location
src/Mono.Android/Android.Views/KeyCharacterMap.csGetat line 5;GetMatchat line 10Current Code
Suggested Fix
Add
///XML doc comments above each of the two public methods only. Do not change any code, signatures, or behavior, and do not add#nullable enable. Use tabs for indentation to match the file. The result should look like:Guidelines
src/Mono.Android/Android.Util/Log.cs(<summary>,<param>,<returns>,<seealso href>), using tabs for indentation.usingdirectives, or add#nullable enable.MetaKeyStatesis in the sameAndroid.Viewsnamespace, so the<see cref>references resolve without a qualifier.Acceptance Criteria
GetandGetMatchoverloads have///XML documentation.Fix-finder metadata
04-missing-xml-docs29/30(actionability:10, safety:10, scope:9)