Skip to content

Fix documentation errors in Android.App.PrivateCompute (R105, pass 3) - #1983

Merged
jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-review-app-privatecompute-docs-r105
Nov 28, 2026
Merged

jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-review-app-privatecompute-docs-r105

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 0f6d89efa46bd8714ea24093146dc0ffd9009ccd

Dimension Assessment Rationale
Change confidence 9/10 ↑ Each fix cites a pinned source line (source-37.2_r01 and dotnet/android@9bc18c75).
↑ All changed XML files parse and git diff --check is clean.
↑ A gemini-4-argon rubber-duck review found no problems in the XML changes.
↓ The OpenPublishing.Build check has not completed yet.

Scope

Pass-3 review of the 20 files in item R105 (Android.App.PrivateCompute, 19 type files and ns-Android.App.PrivateCompute.xml). The AI-authored text came from #1608 (pass 1) and #1794 (pass 2). I reviewed all 372 in-scope channels against the pinned Android source-37.2_r01 Java sources and dotnet/android@9bc18c75. The PccEgressException* and PccService files are not in this item.

Fixes

  1. transfer param on (IntPtr, JniHandleOwnership) constructors (DataMigrationToPccService, EgressReceiverService, EgressRequest, EgressResponse, PccClient). The old text said ownership of the JNI reference transfers to the instance. That is wrong for Java.Lang.Object-derived types. SetHandle makes its own peer reference, then calls JNIEnv.DeleteRef(value, transfer) (dotnet/android@9bc18c75 Object.cs:110-118, JNIEnv.cs:360-393). So transfer controls the release of the incoming reference and peer registration. The new text uses the same wording as Fix documentation errors in Android.App.PermissionUI (R060, pass 3) #1941.
  2. Raw Javadoc link text in InterfaceConsts summaries (AssistantQueryRequest.Query, EgressRequest, EgressResponse, MigrationRequestResult). <c>#describeContents()</c> and <c>#writeToParcel</c> were raw {@link} targets (Parcelable.java:103, 166). They are now crefs to IParcelable.DescribeContents and IParcelable.WriteToParcel, as in Fix Android Security documentation errors (R032, pass 3) #1916 and Fix Wi-Fi Aware and Hotspot2 documentation (R079, pass 3) #1961.
  3. Orphan type-parameter tag in EgressRequest.xml. The managed EgressRequest type is not generic, but the docs had a <param name="&lt;R&gt;&lt;R&gt;"> tag. I removed it (precedent: Fix Java.Util documentation errors (R059, pass 3) #1940 and Fix Android.Animation documentation errors (R155, pass 2) #1845).
  4. DataMigrationToPccService.OnBind(Intent?) returns text. The method is override sealed and the managed parameter is nullable. But DataMigrationToPccService.java:67 calls intent.getAction() with no null check. The returns text now says that a null intent causes a NullPointerException. (Compare EgressReceiverService.java:135, which returns null for a null intent.)

Uncertain findings (no change)

  • The DataMigrationToPccService type docs do not include the Java paragraph about the required permission (DataMigrationToPccService.java:33-35). This is an omission, not an error.
  • The AssistantQueryRequest.Query.Builder constructor docs do not include the UnderstandRequest/sessionId paragraph (AssistantQueryRequest.java:145-146). This is an omission, not an error.
  • Follow-ups from the pass-2 review (Fix documentation errors in Android.App.PrivateCompute (R105, pass 2) #1794): a null Bundle value gives IllegalArgumentException, and an interrupted wait in PccClient gives RuntimeException (PccClient.java:125). The current docs do not state these cases, but they do not state anything wrong.

Checks

  • Every changed XML file parses.
  • git diff --check is clean.
  • The per-channel ledger (372 rows, one numeric pinned source line each) is kept in the review session.
  • Rubber-duck review with gemini-4-argon: no XML problems. It found 4 wrong citations in the ledger, which I corrected.

jonathanpeppers and others added 2 commits November 28, 2026 08:00
Correct the transfer parameter text, replace raw Javadoc member links with crefs, and remove an orphan generic parameter tag.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rvice.OnBind

DataMigrationToPccService.java:66-67 (source-37.2_r01) reads intent.getAction()
without a null check, so the managed Intent? parameter does not return null.

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

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 identified for the documentation-only PrivateCompute API reference corrections.

No open issues 🎉

What changed in this PR

This documentation-only follow-up corrects Android.App.PrivateCompute API reference text to better match the managed bindings and Android behavior. No API signatures or runtime code change.

Changes:

  • Clarify JNI reference handling in five constructor parameter descriptions.
  • Replace raw Javadoc targets with managed IParcelable links in four constant containers.
  • Remove an invalid type-parameter tag and document OnBind behavior for a null intent.
File Description
docs/​xml/​Android.App.PrivateCompute/​PccClient.xml Clarifies JNI reference handling.
docs/​xml/​Android.App.PrivateCompute/​MigrationRequestResult+InterfaceConsts.xml Fixes parcelable method links.
docs/​xml/​Android.App.PrivateCompute/​EgressResponse+InterfaceConsts.xml Fixes parcelable method links.
docs/​xml/​Android.App.PrivateCompute/​EgressResponse.xml Clarifies JNI reference handling.
docs/​xml/​Android.App.PrivateCompute/​EgressRequest+InterfaceConsts.xml Fixes parcelable method links.
docs/​xml/​Android.App.PrivateCompute/​EgressRequest.xml Removes an invalid parameter tag and clarifies JNI reference handling.
docs/​xml/​Android.App.PrivateCompute/​EgressReceiverService.xml Clarifies JNI reference handling.
docs/​xml/​Android.App.PrivateCompute/​DataMigrationToPccService.xml Clarifies JNI reference handling and null-intent behavior.
docs/​xml/​Android.App.PrivateCompute/​AssistantQueryRequest+Query+InterfaceConsts.xml Fixes parcelable method links.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The constructor ownership wording matches the JNI reference-transfer behavior, the IParcelable links resolve to the managed members, and the OnBind null-intent behavior matches the pinned Android 37.2 sources. No blocking issues found in the complete static review.

@jonathanpeppers
jonathanpeppers merged commit ca38605 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-app-privatecompute-docs-r105 branch November 28, 2026 14:38
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