Repository navigation
Fix PDF and text documentation errors (R064, pass 3) - #1946
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the documentation-only updates to PDF form and text-layout guidance.
No open issues 🎉
What changed in this PR
This documentation-only follow-up to #1753 corrects PDF form and text-layout guidance in the .NET Android API reference without changing API metadata or runtime code.
Changes:
- Clarify PDF widget indices, field values, and builder validation, including implementation-dependent behavior.
- Correct line-breaking, locale, hyphenation, and justification descriptions; repair managed links and four Java examples.
- Clarify JNI reference handling, parcel flags, and descriptor-reporting results.
| File | Description |
|---|---|
docs/xml/Android.Graphics.Text/TextRunShaper.xml |
Clarifies JNI reference release and peer registration. |
docs/xml/Android.Graphics.Text/MeasuredText+Builder.xml |
Refines computation guidance and managed API links. |
docs/xml/Android.Graphics.Text/MeasuredText.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Graphics.Text/LineBreakWordStyle.xml |
Corrects automatic phrase-breaking behavior and Java syntax. |
docs/xml/Android.Graphics.Text/LineBreakStyle.xml |
Corrects locale selection, style descriptions, and examples. |
docs/xml/Android.Graphics.Text/LineBreakHyphenation.xml |
Repairs managed links and the merge example. |
docs/xml/Android.Graphics.Text/LineBreaker+Result.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Graphics.Text/LineBreaker+ParagraphConstraints.xml |
Clarifies numeric input guidance and tab-stop results. |
docs/xml/Android.Graphics.Text/LineBreaker+Builder.xml |
Clarifies defaults, empty indents, and justification behavior. |
docs/xml/Android.Graphics.Text/LineBreaker.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Graphics.Text/LineBreakConfig+Builder.xml |
Repairs Java syntax and integer-versus-enum guidance. |
docs/xml/Android.Graphics.Text/LineBreakConfig.xml |
Documents zero descriptor results and unused parcel flags. |
docs/xml/Android.Graphics.Text/JustificationMode.xml |
Revises the justification summary. |
docs/xml/Android.Graphics.Text/BreakStrategy.xml |
Documents tab-triggered greedy breaking and hyphenation conditions. |
docs/xml/Android.Graphics.Pdf.Models/PageMatchBounds.xml |
Clarifies highlight responsibilities and unused parcel flags. |
docs/xml/Android.Graphics.Pdf.Models/ListItem.xml |
Documents unused parcel flags. |
docs/xml/Android.Graphics.Pdf.Models/FormWidgetInfo+Builder.xml |
Clarifies index validation and implementation-dependent zero rejection. |
docs/xml/Android.Graphics.Pdf.Models/FormWidgetInfo.xml |
Corrects field-value, label, and widget-index descriptions. |
docs/xml/Android.Graphics.Pdf.Models/FormEditRecord+Builder.xml |
Clarifies target indices and null-validation timing. |
docs/xml/Android.Graphics.Pdf.Models/FormEditRecord.xml |
Removes the annotation-array assumption from index documentation. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: My remaining checks are the PDF form-builder defaults and validation ( |
dalexsoto
left a comment
There was a problem hiding this comment.
Approving 50dbf01. I checked all 20 changed documentation files against the AOSP sources.
- PDF: The
FormWidgetInfo.Builderconstructor text matches the source: it null-checkswidgetRect,textValueandaccessibilityLabelbut doesn't range-checkwidgetIndex. The hedged zero/NaN wording forSetFontSize/SetMaxLengthand theWriteToParcel/DescribeContents/nullable-getter text are accurate. - Text layout: The
LineBreaker,LineBreakConfig,LineBreakStyle/LineBreakWordStyleandMeasuredText.Builderdocs matchLineBreakConfig.java,MeasuredText.javaand minikin. That covers the unspecified-style resolution (Nonewhen the app targets SDK 34 or lower,Autowhen it targets SDK 35 or higher), the run-coverage and builder-reuse rules, and the hyphenation and layout defaults.
Only <Docs> content changes, so the API surface is unchanged. Static review only; I didn't run any builds or tests.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
50dbf01ada71c2bb67a2c122c48d520db56d9a0a↑ Gemini reviewed the corrected head.
↓ The platform 37.2 r02 implementation was not available.
↓ Runtime behavior was not tested on devices.
Scope
Third-pass review of the 37 files in
Android.Graphics.Pdf.Models,Android.Graphics.Pdf.Models.Selection, andAndroid.Graphics.Textassigned to R064. The personal ledger covers all 152 in-scope AI-changed documentation blocks and all 384 changed channels; 61 binding-runtime boilerplate blocks were excluded. The review found 62 AI-changed channels to fix. Two older channels in the sameFormWidgetInfo.WidgetIndexblock also changed because they contradicted the corrected value. No placeholders were present before or after.I rechecked pass-2 #1753, including its review: its constant-owner corrections and citation removals are supported. Its two zero-value questions remain qualified below.
Changes and evidence
FormWidgetInfo.java:377-382andFormEditRecord.java:233-317.LineBreaker.java:197-247, 505-509andMeasuredText.java:390-428supply the managed configuration facts.WriteToParcelflags andDescribeContentsresults using SDKListItem.java:95-104,PageMatchBounds.java:99-108, andLineBreakConfig.java:627-636. Correct JNI reference ownership using Java.Lang.Object and JNIEnv.The platform 37.2 r01 SDK source archive used above has SHA-256
9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84. The bindings target r02; the archive alone does not establish r02 implementation behavior.Uncertain findings
FormWidgetInfo.Builder.SetFontSize: the SDK r01 and Android 15-17 sources checkfontSize > 0, rejecting zero and NaN. The current Android reference permits zero. The r02 implementation was not found, so the corrected text recommends a positive value and identifies the observed rejection without claiming all implementations reject zero.FormWidgetInfo.Builder.SetMaxLength: the SDK r01 and Android 15-17 sources checkmaxLength > 0, while the current Android reference permits zero. The r02 implementation was not found; the wording states the observed difference.Checks and follow-ups
<Docs>, preserved BOMs and line endings, and preserved API metadata.git diff --checkand OpenPublishing.Build passed.crefvalues resolve to exact prefixed DocIds. Four changed Java examples compile against the installed 37.2 r02android.jar(SHA-2562507cf762abe2171a8cb3c289837fc71f2e66e598f396f1cc10bb7dc10020329).gemini-4-argonreview identified a filtered-widget index edge case; the correction was reviewed again with no remaining findings. The local usage log confirms the model on both review turns.LineBreaker.xmlcontain errors includingappednStyleRunand a duplicatecvariable;MeasuredText+Builder.xmlusestext.lengthrather thantext.length(). Both examples also contain escaped code markup.