Skip to content

Fix documentation errors in Android.Hardware.Input (R140, pass 3) - #2019

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-review-hardware-input-docs-r140-p3
Open

jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-review-hardware-input-docs-r140-p3

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 7763c3c13a2aa330151e67af55f7d6e91f0b0062

Dimension Assessment Rationale
Change confidence 9/10 ↑ Three one-line text edits; all changed XML files parse; git diff --check is clean.
↑ An independent gemini-4-argon review agreed with all 3 fixes and found no other errors.
↓ The docs build (OpenPublishing.Build) has not run yet.
Diagnosis confidence 9/10 ↑ Each fix cites pinned source lines (dotnet/android@9bc18c75; source-37.2_r01 InputManager.java).
Evidence fit 9/10 ↑ The old text contradicts the pinned runtime and framework behavior.

Pass-3 review of AI-authored documentation (item R140, 16 files in Android.Hardware.Input). Only text that changed since 86f7744a1 was in scope.

Fixes

  1. CustomizationAction and CustomizationTrigger (IntPtr, JniHandleOwnership) constructors, transfer param. The old text said "Specifies whether ownership of the JNI reference transfers to this instance." For types derived from Java.Lang.Object, the peer makes its own reference. transfer selects deletion of the incoming reference and peer registration (dotnet/android@9bc18c75 Object.cs:110-118, JNIEnv.cs:360-393). The new text uses the Fix documentation errors in Android.App.PermissionUI (R060, pass 3) #1941 wording.
  2. InputManager.AddPeripheralCustomization remarks. "remap a key" changed to "remap a key or button". InputManager.java:1957 forwards any CustomizationTrigger. Lines 2096-2097 show that stored customizations with TRIGGER_TYPE_BUTTON come back as ButtonCustomizationTrigger. Pass 2 (Fix Android.Hardware.Input documentation errors (R140, pass 2) #1826) marked this item uncertain. The pinned implementation decides it.

Review results

  • Ledger: 375 rows for 375 changed channels. 305 correct (177 of these are verbatim constant/enum rows, checked by script against KeyEvent/MotionEvent values), 3 fixed, 67 deferred (ThresholdClass/ThresholdType/JniPeerMembers/UnregisterFromRuntime boilerplate).
  • Uncertain findings: 0.
  • Pinned source: source-37.2_r01.zip (SHA256 9d637c3a…4e84).

- CustomizationAction/CustomizationTrigger: correct the transfer parameter text (#1941 wording).

- InputManager.AddPeripheralCustomization: the remap applies to a key or button trigger.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 21:45
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the documentation updates clarifying JNI reference handling and key and button remapping.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects three descriptions in Android.Hardware.Input, clarifying JNI reference handling and peripheral customization support without changing API metadata or runtime behavior.

Changes:

  • Clarifies that constructor transfer parameters control JNI reference release and peer registration.
  • Updates AddPeripheralCustomization remarks to cover both key and button remapping, addressing the uncertainty noted in pass 2.
File Description
docs/​xml/​Android.Hardware.Input/​InputManager.xml Documents key and button remapping support.
docs/​xml/​Android.Hardware.Input/​CustomizationTrigger.xml Corrects the constructor’s transfer parameter description.
docs/​xml/​Android.Hardware.Input/​CustomizationAction.xml Corrects the constructor’s transfer parameter description.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto

Copy link
Copy Markdown
Member

In response to @jonathanpeppers's request: The two JNI transfer-text corrections match Object.SetHandle/DeleteRef. I have not yet verified InputManager.AddPeripheralCustomization's new "key or button" wording against matching-version Android source: public AOSP main InputManager.java does not contain this API, and CustomizationTrigger.java returned HTTP404. This is a reviewer source-coverage gap, not evidence of a defect in the PR. The matching source and the final post-supplement check remain queued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants