Skip to content

Fix Android.App documentation errors (R128, pass 2) - #1819

Merged
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-review-android-app-r128
Nov 25, 2026
Merged

jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-review-android-app-r128

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 506e90e5065615323b1b595bf4ea105772cafe4a

Dimension Assessment Rationale
Change confidence 8/10 ↑ Reviewed documentation against sources and checked XML, preservation and added DocIds.
↑ Independent Gemini review findings and a Copilot finding were checked and addressed.
↓ The immutable Android 37.2 r02 implementation was unavailable for disputed memory-budget wording.
Diagnosis confidence 8/10 ↑ Pinned Android source and managed signatures support the corrections, including the handoff extras conversion.
↓ One existing memory-budget claim remains uncertain.
Evidence fit 9/10 ↑ The review found concrete documentation errors within the assigned pass-2 scope.

Scope

Pass-2 review R128: 496 inventory blocks in 51 existing Android.App files. Of these, 88 are excluded binding boilerplate and 10 are formatting-only; 313 were reviewed as correct, 84 were corrected, and one contains an uncertain claim. The diff changes 85 documentation blocks in 28 files; the uncertain block also contains proven link corrections.

Fixes and evidence

The Android SDK 37.2 r01 source archive, SHA-256 9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84, supplies the named Java source paths below. The binding is 37.2 r02; conflicting r01 facts were not used to replace r02 documentation.

  • Correct instrumentation monitor blocking, matching, timeout, interruption, result, and lifecycle references; restore the unit-test caveat for the managed string overload of NewActivity. See src/android/app/Instrumentation.java:724-904,1000-1033,1400-1430 and the managed instrumentation overloads.
  • Correct ImportanceReason.ServiceInUse to describe a service connection, not a content provider. See Android 17's OOM adjustment code.
  • Correct keyguard dismissal callbacks and managed references, permission names, listener parameters, and deprecated API guidance. See src/android/app/KeyguardManager.java:511-605,844-910,1325-1443.
  • Correct IntentService.OnBind, the managed constructor reference, service callbacks and redelivery links. See src/android/app/IntentService.java and the managed constructor's Java wrapper.
  • Correct list layout resource IDs, XML language labels, and managed list references. See src/android/app/ListActivity.java, src/android/app/ListFragment.java, and the Android 17 two-line row layout.
  • Correct loader callback names and local-activity reuse and flag references; restore the removed ActivityNotFoundException tag. See src/android/app/LoaderManager.java:132-181 and src/android/app/LocalActivityManager.java:267-301,523-563.
  • Restore locale setter contracts and reference links and use managed property names. See src/android/app/LocaleConfig.java and src/android/app/LocaleManager.java:58-80,192-215.
  • Use managed memory-budget properties and listener names, restore setter details and reference links, remove orphan property parameter tags, and avoid asserting the last value set is always returned. See src/android/app/MemoryBudgetManager.java and the current Android reference.
  • Correct handoff and parcel flag references, remove a constructor return tag, and use managed callback and property names. Clarify conversion of handoff extras to Bundle for Intent.PutExtras. See src/android/app/HandoffActivityData.java, HandoffActivityDataRequestInfo.java, HandoffActivityParams.java, and src/android/os/Parcelable.java.
  • Correct media-route overload guidance, launcher query overloads, native surface callback and pixel-format references, interruption-filter names, and the activity-options bundle and JNI ownership descriptions. See src/android/app/MediaRouteActionProvider.java:69-127, MediaRouteButton.java, LauncherActivity.java, NativeActivity.java, InfeasibleActivityOptionsException.java, and Java.Lang.Object's peer constructor.

Uncertain

The MemoryBudgetManager class remarks say every attempt to exceed a system or manifest limit throws. The pinned r01 source says the same, but the current 37.2 reference describes per-lifecycle-state clamping and a throw only when every state exceeds its limit. An immutable r02 implementation was not located, so this claim remains unchanged.

Checks

  • Parsed all 28 changed XML files; confirmed bytes outside Docs are unchanged, newline style is preserved, and no placeholder count increased.
  • Verified all 89 distinct added cref values against existing DocIds.
  • git diff --check.
  • Independent gemini-4-argon review completed; the model was verified in local assistant_usage_events. Verified findings were fixed; formatting-only pre-AI text remains out of scope.
  • Copilot identified a handoff extras conversion issue; the guidance was corrected and a fresh review was requested.

jonathanpeppers and others added 2 commits November 24, 2026 20:21
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 02:37
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 25, 2026 02:37

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.

🟡 Changes recommended

The documentation recommends passing a PersistableBundle directly to Intent.PutExtras, but its managed overloads accept only Bundle or Intent, so the guidance produces code that does not compile.

1 open issue
What changed in this PR

This documentation-only PR corrects Android.App API guidance across 28 XML files, aligning descriptions and links with the managed bindings without changing runtime code.

Changes:

  • Clarifies instrumentation, keyguard, service, locale, and memory-budget contracts.
  • Replaces Java-style references with managed API links.
  • Corrects layout examples, parameter descriptions, and documentation metadata.
File Description
docs/​xml/​Android.App/​NativeActivity.xml Corrects surface callback links and pixel-format wording.
docs/​xml/​Android.App/​MissingForegroundServiceTypeException.xml Clarifies parcel flags.
docs/​xml/​Android.App/​MemoryBudgetManager+IOnOverBudgetListener.xml Fixes callback summary grammar.
docs/​xml/​Android.App/​MemoryBudgetManager.xml Clarifies budget properties, setters, and listener references.
docs/​xml/​Android.App/​MediaRouteButton.xml Links managed drawing and measurement callbacks.
docs/​xml/​Android.App/​MediaRouteActionProvider.xml Corrects route-selection and overload guidance.
docs/​xml/​Android.App/​LocaleManager.xml Restores locale-setting and override contracts.
docs/​xml/​Android.App/​LocaleConfig.xml Corrects override links, locale-format guidance, and parcel flags.
docs/​xml/​Android.App/​LocalActivityManager.xml Clarifies activity reuse and restores exception metadata.
docs/​xml/​Android.App/​LoaderManager.xml Links managed loader callbacks.
docs/​xml/​Android.App/​ListFragment.xml Corrects layout IDs, XML labels, and list-method links.
docs/​xml/​Android.App/​ListActivity.xml Corrects layout examples and an adapter name in a comment.
docs/​xml/​Android.App/​LauncherActivity.xml Links the managed activity-query overload.
docs/​xml/​Android.App/​KeyguardManager+KeyguardLock.xml Updates deprecation, lifecycle, and permission references.
docs/​xml/​Android.App/​KeyguardManager.xml Clarifies dismissal callbacks and managed API references.
docs/​xml/​Android.App/​InvalidForegroundServiceTypeException.xml Clarifies parcel flags.
docs/​xml/​Android.App/​InterruptionFilter.xml Links managed notification-policy properties.
docs/​xml/​Android.App/​IntentService.xml Corrects binding results, constructor links, and redelivery guidance.
docs/​xml/​Android.App/​Instrumentation+ActivityMonitor.xml Clarifies blocking flags and recorded-activity semantics.
docs/​xml/​Android.App/​Instrumentation.xml Clarifies monitor waits, timeouts, and activity-construction limitations.
docs/​xml/​Android.App/​InfeasibleActivityOptionsException.xml Corrects activity-options and JNI-reference descriptions.
docs/​xml/​Android.App/​ImportanceReason.xml Corrects the service-connection explanation and property links.
docs/​xml/​Android.App/​Importance.xml Updates managed constants and Android-version terminology.
docs/​xml/​Android.App/​HandoffActivityParams+Builder.xml Removes an invalid constructor return tag.
docs/​xml/​Android.App/​HandoffActivityParams.xml Clarifies parcel flags.
docs/​xml/​Android.App/​HandoffActivityDataRequestInfo.xml Links the managed handoff callback.
docs/​xml/​Android.App/​HandoffActivityData+Builder.xml Links the destination activity property.
docs/​xml/​Android.App/​HandoffActivityData.xml Updates handoff property references and parcel guidance.

Review effort: Balanced

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

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

Conflicting r01 and current-reference limit behavior, without immutable r02 implementation evidence, requires human source-version verification of the retained limit-exception claim for Android 37.2.

No open issues 🎉

1 resolved since last review

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 28 changed documentation files at 506e90e5, including all 89 added DocId references and the accepted discussion decisions. The corrected PersistableBundle guidance now copies into a Bundle before Intent.PutExtras; the ImportanceReason and keyguard corrections agree with Android 17 source. The unchanged, explicitly acknowledged MemoryBudget claim is not a new regression. No blocking issues found. Static review only; no builds or tests executed.

@jonathanpeppers
jonathanpeppers merged commit a0b802b into main Nov 25, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-android-app-r128 branch November 25, 2026 04:26
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