Repository navigation
Fix documentation errors in Android.Widget.Inline and Android.Widget.PhotoPicker (R101, pass 3) - #1980
Conversation
…PhotoPicker (R101, pass 3) - Correct transfer parameter wording for Object-derived constructors. - Remove unsupported IllegalArgumentException claims from SetHighlightAlbumId. - State that the embedded picker use of AspectRatio starts with API level 37. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The documentation updates have no active review issues.
No open issues 🎉
What changed in this PR
This documentation-only follow-up corrects API behavior and availability descriptions in the Android Inline and Photo Picker managed bindings.
Changes:
- Clarifies JNI reference release and peer-registration behavior in two constructor parameters.
- Removes unsupported exception claims from
SetHighlightAlbumIdremarks. - Identifies API level 37 as the introduction of the embedded picker’s enum-based aspect-ratio setter.
| File | Description |
|---|---|
| docs/xml/Android.Widget.PhotoPicker/EmbeddedPhotoPickerProviderFactory.xml | Corrects the JNI transfer parameter description. |
| docs/xml/Android.Widget.PhotoPicker/EmbeddedPhotoPickerFeatureInfo+Builder.xml | Removes unsupported highlight-validation exception claims. |
| docs/xml/Android.Widget.PhotoPicker/AspectRatio.xml | Adds the API-level qualification for the embedded picker setter. |
| docs/xml/Android.Widget.Inline/InlineContentView.xml | Corrects the JNI transfer parameter description. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: The JNI transfer wording checks out against the runtime. Two source checks remain: |
|
@dalexsoto: here is the evidence for the two checks that are still open. 1. public Builder setHighlightAlbumId(
@NonNull @PickImagesHighlightAlbum String highlightAlbumId
) {
if (highlightAlbumId == null) {
throw new IllegalArgumentException("Input highlight album cannot be null");
}
mHighlightAlbumId = highlightAlbumId;
return this;
}
2. AspectRatio API 37 boundary.
The |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed all four documentation changes and the relevant JNI ownership, pinned Android 37.2 source, and API 36/37 index context. The highlight-exception corrections and API-level qualification match the inspected implementation and availability evidence; no blocking issues found.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
50fd3b03a19fe50e2911530a0fef88460ec72c43git diff --checkpasses.↑ Each fix cites pinned source-37.2_r01 lines or FrameworksIndex lines.
↓ OpenPublishing.Build not yet observed.
↓ The PhotoPicker service side is not in the pinned source.
Scope
Pass-3 review of AI-written text in
docs/xml/Android.Widget.Inlineanddocs/xml/Android.Widget.PhotoPicker(25 files, text changed in86f7744a1..origin/main). 489 channels were reviewed one at a time against Androidsource-37.2_r01. Previous passes: #1609, #1784.Fixes
InlineContentView.xmlandEmbeddedPhotoPickerProviderFactory.xml,transferparam: "Specifies whether ownership of the JNI reference transfers to this instance" is wrong forJava.Lang.Objecttypes. The peer makes its own reference.transferselects deletion of the incoming reference and peer registration (dotnet/android@9bc18c75Object.cs:110-118,JNIEnv.cs:360-393). The wording is the same as in Fix documentation errors in Android.App.PermissionUI (R060, pass 3) #1941.EmbeddedPhotoPickerFeatureInfo+Builder.xml,SetHighlightAlbumIdremarks: removed two sentences that say anIllegalArgumentExceptionis thrown for other album ids and when both highlight options are used.setHighlightAlbumIdthrows only for null (EmbeddedPhotoPickerFeatureInfo.java:474-482).build()(753-771) andEmbeddedPhotoPickerProviderFactory.openSession(156-260) do not validate these cases. Service errors go toonSessionError(EmbeddedPhotoPickerClientWrapper.java:72-75).AspectRatio.xmlremarks: added "Starting with API level 37,". TheAspectRatioenum is in the API 36 docs (FrameworksIndex/net-android-36.0.xml:121550), butEmbeddedPhotoPickerUiCustomizationParams.Builder.SetAspectRatiois in API 37 only (net-android-37.0.xml:123561,123564). This was a pass-2 follow-up from @dalexsoto.Uncertain findings
None. Note only:
PhotoPickerSelectionParams.Builder.setMinVideoDurationrejects zero (PhotoPickerSelectionParams.java:328-329), but its Javadoc says "negative". The current doc text makes no claim about this, so no edit was made.Checks
git diff --checkpasses. Encoding, BOM, and line endings are unchanged.index.xml,_filter.xml, orFrameworksIndex.