Repository navigation
Fix documentation errors in Android.App.AppFunctions (R108, pass 3) - #1986
Conversation
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>
There was a problem hiding this comment.
🔵 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
AppFunctionServiceconstructor. - 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
|
Evidence for the Android 16 / 16 QPR1 threading boundary in
|
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
f513d8aa2599887110efee2c5148b132d898ce2cgit diff --checkis 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)
*+InterfaceConsts.xmlfiles:#describeContents()changed toIParcelable.DescribeContents, and#writeToParcelchanged toIParcelable.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.Activitychanged toT:Android.App.Activity.AppFunctionActivityState: link changed to theGetAppFunctionActivityStatescref.AppFunctionMetadataandAppFunctionSearchSpec: links changed to theSearchAppFunctionscref.AppFunctionService: links changed to theExecuteAppFunctioncref.AppFunctionMetadata: theEXECUTE_APP_FUNCTIONSlink is now theF:Android.Manifest.Permission.ExecuteAppFunctionscref.EXECUTE_APP_FUNCTIONS_SYSTEMhas no managed field, so its link text became<c>android.permission.EXECUTE_APP_FUNCTIONS_SYSTEM</c>.AppFunctionService.OnExecuteFunctionparams:CINNAMON_BUNchanged toF:Android.OS.BuildVersionCodes.CinnamonBun. Source: AppFunctionService.java:207 and :212.AppFunctionService(IntPtr, JniHandleOwnership)transferparam (known pattern 1): the text "Specifies whether ownership of the JNI reference transfers to this instance" was wrong. The peer makes its own reference, andtransferselects 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.AppFunctionServicethreading 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:performdirectly.getMainExecutor().Uncertain findings (not changed)
AppFunctionMetadataremarks. The class Javadoc (AppFunctionMetadata.java:44-46) says all XML properties, including unknown ones, are available throughgetMetadataDocument. ThegetMetadataDocumentJavadoc (: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.OnExecuteFunctioncallingPackageandcallingPackageSigningInfoparams. 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".ExecuteAppFunctionRequest#getFunctionIdentifier()inOnExecuteFunctionremarks is pre-AI text. It is noted here only.SCOPE_ACTIVITYJavadoc (:183-186) conflicts with theregisterAppFunction@throwscontract (AppFunctionManager.java:704-709). The doc follows the method contract, which the code enforces at :939-942.Checks
git diff --checkis clean.To be addedplaceholders.index.xmlis not changed.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 forAppFunctionService.java, but the pinned file hasonBindat :183.Ledger (session storage):
C:\Users\jopepper\.copilot\session-state\165de1dc-c37d-4275-825f-75760c4d59fd\files\ledger.mdhas 495 rows. Of these, 373 are personal, 113 are deferred, and 9 are out of scope (pre-AI).