Skip to content

Fix documentation errors in Android.App.AppFunctions (R108, pass 3) - #1986

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-appfunctions-docs-r108
Nov 28, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-appfunctions-docs-r108

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: f513d8aa2599887110efee2c5148b132d898ce2c

Dimension Assessment Rationale
Change confidence 9/10 ↑ All 12 changed XML files parse; git diff --check is clean.
↑ Every new cref resolves to an existing DocId (script check and gemini-4-argon review).
↑ Threading boundary checked at android-16.0.0_r1, _r3 and 17_r1.
↓ Two uncertain items below stay unchanged because pinned sources disagree.

Pass-3 review of R108 (docs/xml/Android.App.AppFunctions, 25 files). I reviewed all 486 AI-changed channels against SDK sources 37.2_r01. 113 channels are binding boilerplate that the kickoff defers. The other 373 channels each have a personal ledger row with a verdict and a pinned source line.

Fixes (12 files, 27 lines)

  1. Raw Javadoc link text changed to crefs (known pattern 2):
    • 7 *+InterfaceConsts.xml files: #describeContents() changed to IParcelable.DescribeContents, and #writeToParcel changed to IParcelable.WriteToParcel. Source: Parcelable.java:166 and :103. This follows the Fix documentation errors in Android.App.PrivateCompute (R105, pass 3) #1983 precedent.
    • AppFunctionActivityId: android.app.Activity changed to T:Android.App.Activity.
    • AppFunctionActivityState: link changed to the GetAppFunctionActivityStates cref.
    • AppFunctionMetadata and AppFunctionSearchSpec: links changed to the SearchAppFunctions cref.
    • AppFunctionService: links changed to the ExecuteAppFunction cref.
    • AppFunctionMetadata: the EXECUTE_APP_FUNCTIONS link is now the F:Android.Manifest.Permission.ExecuteAppFunctions cref. EXECUTE_APP_FUNCTIONS_SYSTEM has no managed field, so its link text became <c>android.permission.EXECUTE_APP_FUNCTIONS_SYSTEM</c>.
    • AppFunctionService.OnExecuteFunction params: CINNAMON_BUN changed to F:Android.OS.BuildVersionCodes.CinnamonBun. Source: AppFunctionService.java:207 and :212.
  2. AppFunctionService(IntPtr, JniHandleOwnership) transfer param (known pattern 1): the text "Specifies whether ownership of the JNI reference transfers to this instance" was wrong. The peer makes its own reference, and transfer selects whether the runtime deletes the incoming reference and registers the peer (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.
  3. AppFunctionService threading version boundary: the text now says the method can run on a Binder thread in the initial Android 16 release, and that the system dispatches it to the main thread starting with Android 16 QPR1. Evidence:
    • AOSP android-16.0.0_r1 AppFunctionService.java:107 calls perform directly.
    • android-16.0.0_r3 :106, 17.0.0_r1 :134, and pinned 37.2 :134 use getMainExecutor().

Uncertain findings (not changed)

  • (a) AppFunctionMetadata remarks. The class Javadoc (AppFunctionMetadata.java:44-46) says all XML properties, including unknown ones, are available through getMetadataDocument. The getMetadataDocument Javadoc (:437-441) says that properties not defined in the class are not guaranteed. The two pinned sources disagree, and no implementation line decides which one is correct.
  • (b) OnExecuteFunction callingPackage and callingPackageSigningInfo params. The pinned 37.2 r01 source always passes an empty value (AppFunctionService.java:159-160). In AOSP 17_r1, Flags.enableAppFunctionPermissionV2() controls this value. The doc keeps the upstream text "Starting in CinnamonBun".
  • Pre-AI text. The raw span ExecuteAppFunctionRequest#getFunctionIdentifier() in OnExecuteFunction remarks is pre-AI text. It is noted here only.
  • SCOPE_ACTIVITY Javadoc (:183-186) conflicts with the registerAppFunction @throws contract (AppFunctionManager.java:704-709). The doc follows the method contract, which the code enforces at :939-942.

Checks

  • All 12 changed XML files parse.
  • git diff --check is clean.
  • No new To be added placeholders.
  • All crefs in the changed files resolve.
  • index.xml is not changed.
  • Rubber-duck review with gemini-4-argon: verified in assistant_usage_events, which has 11 calls. The review found no problems in the XML. I fixed its ledger citation findings. I rejected one finding: it claimed different line numbers for AppFunctionService.java, but the pinned file has onBind at :183.

Ledger (session storage): C:\Users\jopepper\.copilot\session-state\165de1dc-c37d-4275-825f-75760c4d59fd\files\ledger.md has 495 rows. Of these, 373 are personal, 113 are deferred, and 9 are out of scope (pre-AI).

Replace raw Javadoc link text with crefs, correct the JNI transfer
parameter text, and state the Android 16 / 16 QPR1 threading boundary
for AppFunctionService.onExecuteFunction.

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

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.

🔵 Needs a closer look

Independent confirmation of the Android 16 QPR1 main-thread guarantee remains unresolved because the pinned AOSP implementation is unavailable locally and external retrieval did not establish the precise release boundary.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects API links and runtime behavior descriptions in Android.App.AppFunctions, improving the managed Android API reference without changing executable code.

Changes:

  • Replace raw Java references with managed API links, following earlier documentation fixes.
  • Clarify JNI reference handling in the AppFunctionService constructor.
  • Correct the main-thread dispatch boundary to Android 16 QPR1.
File Description
docs/​xml/​Android.App.AppFunctions/​AppFunctionService.xml Correct API links, JNI handling text, and threading guidance.
docs/​xml/​Android.App.AppFunctions/​AppFunctionSearchSpec+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionSearchSpec.xml Link the managed search method.
docs/​xml/​Android.App.AppFunctions/​AppFunctionSchemaMetadata+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionPackageMetadata+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionName+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionMetadata+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionMetadata.xml Correct search and permission references.
docs/​xml/​Android.App.AppFunctions/​AppFunctionActivityState+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionActivityState.xml Link the managed activity-state query.
docs/​xml/​Android.App.AppFunctions/​AppFunctionActivityId+InterfaceConsts.xml Link Parcelable methods in constant summaries.
docs/​xml/​Android.App.AppFunctions/​AppFunctionActivityId.xml Link the managed Activity type.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

Evidence for the Android 16 / 16 QPR1 threading boundary in AppFunctionService:

@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 and their affected references. The Android 16 QPR1 main-executor boundary and permission literal match the upstream sources; no blocking issues found.

@jonathanpeppers
jonathanpeppers merged commit 4187555 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-appfunctions-docs-r108 branch November 28, 2026 15: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