Skip to content

Fix documentation errors in Android.App.AppFunctions (R141, pass 3) - #2020

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-app-appfunctions-docs-r141-pass-3
Nov 28, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-app-appfunctions-docs-r141-pass-3

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 225193aba2bdc57a3ba2e0f01dc5be0522600945

Dimension Assessment Rationale
Change confidence 9/10 ↑ All 12 changed files parse as XML; git diff --check is clean.
↑ All new cref DocIds exist and none is obsolete.
↑ gemini-4-argon review found no issues.
↓ The docs build (OpenPublishing.Build) has not run yet.
Diagnosis confidence 9.5/10 ↑ The raw #member link text is visible in the diff.
↑ The AppFunctionUriGrant constructor rejects a mode of 0 (AppFunctionUriGrant.java:108-115).
Evidence fit 9/10 ↑ Each fix matches a known error pattern from the review kickoff (raw links) or a contradiction proved by the pinned implementation (ModeFlags).

Scope

Pass-3 review item R141: 14 files in docs/xml/Android.App.AppFunctions (AppFunctionState, AppFunctionUriGrant, ExecuteAppFunctionRequest and its Builder, ExecuteAppFunctionResponse, RegisterAppFunctionRequest, IAppFunction, IAppFunctionObservation, IAppFunctionObserver, IAppFunctionRegistration, and the InterfaceConsts files). I reviewed 236 AI-changed channels (86f7744..main). 174 channels have a personal ledger row with a numeric pinned source line. The other 62 channels are deferred ThresholdClass/ThresholdType/JniPeerMembers/UnregisterFromRuntime boilerplate. Pinned source: source-37.2_r01 (SHA256 9d637c3a…4e84). For the Attribution claim, I also used frameworks/base android-17.0.0_r1.

Fixes

1. Raw Java link text replaced with crefs (25 lines)

AI-changed text kept Javadoc {@link Class#member} targets as <c>Class#member</c>. Each is now a <see cref> to the matching .NET member:

  • #describeContents() / #writeToParcel → IParcelable.DescribeContents / IParcelable.WriteToParcel (State and UriGrant InterfaceConsts, 4 lines; Parcelable.java:103, :166)
  • AppFunctionManager#getAppFunctionStates → AppFunctionManager.GetAppFunctionStates (AppFunctionState.java:30-31)
  • AppFunctionManager#executeAppFunction → AppFunctionManager.ExecuteAppFunction 4-arg overload (UriGrant, Request, Response, IAppFunction.OnExecuteFunction; same choice as Fix documentation errors in Android.App.AppFunctions (R108, pass 3) #1986)
  • ExecuteAppFunctionResponse#getResultDocument / #getExtras → ResultDocument / Extras properties (constructor params and PropertyReturnValue; ExecuteAppFunctionResponse.java:61-63, 91-120)
  • AppFunctionMetadata#getName → AppFunctionMetadata.Name (Builder ctors; ExecuteAppFunctionRequest.java:238-252)
  • AppFunctionManager#registerAppFunction / #registerAppFunctions / #observeAppFunctions → the matching AppFunctionManager methods (AppFunction.java:24, AppFunctionRegistration.java:20, :31, AppFunctionObservation.java:19, :26, AppFunctionObserver.java:24, RegisterAppFunctionRequest.java:24)

2. AppFunctionUriGrant.ModeFlags value range

The old <value> said "Value is either 0 or a combination of …". The value can never be 0. The constructor throws IllegalArgumentException unless Intent.isAccessUriMode(modeFlags) (AppFunctionUriGrant.java:108-115). isAccessUriMode requires the READ or WRITE bit (Intent.java:7223-7225). CREATOR also uses this constructor (AppFunctionUriGrant.java:71). The new text says that the value always includes GrantReadUriPermission, GrantWriteUriPermission, or both, and can also include GrantPrefixUriPermission and GrantPersistableUriPermission. This matches the constructor @param modeFlags text (AppFunctionUriGrant.java:103-106).

Uncertain findings (not changed)

  1. The IAppFunctionRegistration remarks show Service.stopForeground(boolean). The source (AppFunctionRegistration.java:23-24) links Service#stopForeground with no overload. The boolean overload is deprecated. The text is imported rendering, so I did not change it.
  2. The ModeFlags fix touches IntDef-style "Value is either 0 or…" text, which Add --repair-docs importer mode and fix 2268 recurring doc errors #1540 generated. I changed it because the pinned constructor rejects 0 (see fix 2).
  3. The ExecuteAppFunction cref uses the 4-arg overload. The Java link names no overload, and a 5-arg overload (with AppInteractionSession) also exists.
  4. There are raw #member spans in channels that the AI did not change (Request/Response InterfaceConsts, Request.xml lines 49 and 52, and Response.xml lines 49, 52, 387, 390, 392 and 434). They are out of scope, so I did not change them.

Checks

  • All 12 changed files parse as XML. git diff --check is clean. The changes add no "To be added" text.
  • All 14 new cref DocIds exist in docs/xml. None is obsolete.
  • The scope has no transfer params, no obsolete crefs and no implementation-source citations.
  • gemini-4-argon rubber-duck review: no issues. The local assistant_usage_events table shows model gemini-4-argon, agent 81cafc32-2eef-4768-aa41-00bb1618d813, rows 353674-353692 (2026-11-28T21:49-21:50Z).
  • Ledger: 174 personal rows plus 62 deferred boilerplate rows, 236 rows in total.

Replace raw Javadoc link text with crefs and correct the AppFunctionUriGrant.ModeFlags value range.

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:51
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 21:51

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 block approval of this documentation-only change.

No open issues 🎉

What changed in this PR

This documentation-only PR continues the AppFunctions cleanup, improving navigation to managed APIs and correcting the documented URI permission flags. It makes no runtime code changes.

Changes:

  • Replaces raw Java member references with managed API cref links.
  • Corrects AppFunctionUriGrant.ModeFlags documentation to require read permission, write permission, or both.
File Description
docs/​xml/​Android.App.AppFunctions/​RegisterAppFunctionRequest.xml Links to the batch registration method.
docs/​xml/​Android.App.AppFunctions/​IAppFunctionRegistration.xml Links registration and unregistration summaries to the registration method.
docs/​xml/​Android.App.AppFunctions/​IAppFunctionObserver.xml Links to the observation method.
docs/​xml/​Android.App.AppFunctions/​IAppFunctionObservation.xml Links observation lifecycle summaries to the observation method.
docs/​xml/​Android.App.AppFunctions/​IAppFunction.xml Links to registration and execution methods.
docs/​xml/​Android.App.AppFunctions/​ExecuteAppFunctionResponse.xml Links to execution, result document, and extras APIs.
docs/​xml/​Android.App.AppFunctions/​ExecuteAppFunctionRequest+Builder.xml Links constructor parameters to the metadata name property.
docs/​xml/​Android.App.AppFunctions/​ExecuteAppFunctionRequest.xml Links to the execution method.
docs/​xml/​Android.App.AppFunctions/​AppFunctionUriGrant+InterfaceConsts.xml Links parcelable constants to interface methods.
docs/​xml/​Android.App.AppFunctions/​AppFunctionUriGrant.xml Links to execution and corrects the valid permission flag range.
docs/​xml/​Android.App.AppFunctions/​AppFunctionState+InterfaceConsts.xml Links parcelable constants to interface methods.
docs/​xml/​Android.App.AppFunctions/​AppFunctionState.xml Links to the runtime state query method.

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.

Reviewed all 12 changed documentation files, cref targets and overloads, and the URI-grant mode contract against the Android implementation. No blocking issues found in the static review.

@jonathanpeppers
jonathanpeppers merged commit 3ff9bfa into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-app-appfunctions-docs-r141-pass-3 branch November 28, 2026 22: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