Repository navigation
Fix documentation errors in Android.OS.Ext (R074, pass 3) - #1955
Merged
jonathanpeppers merged 1 commit intoNov 28, 2026
Merged
Conversation
…s 3) SdkExtensions.java:124,127-128 throws IllegalArgumentException for identifiers below VERSION_CODES.R. The method returns 0 only for identifiers at R or higher with no version (line 155). Add the missing exception tag. 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 recorded for this documentation-only clarification of extension-version return values and invalid-identifier exceptions.
No open issues 🎉
What changed in this PR
Corrects the SdkExtensions.GetExtensionVersion(int) API documentation to distinguish unavailable extension versions from invalid identifiers. No runtime code changes are included.
Changes:
- Clarifies that zero is returned for identifiers at
BuildVersionCodes.Ror higher when no version is available. - Documents
IllegalArgumentExceptionfor invalid extension identifiers.
| File | Description |
|---|---|
| docs/xml/Android.OS.Ext/SdkExtensions.xml | Corrects return-value documentation and adds the exception contract. |
Review effort: Balanced
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Nov 28, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
Reviewed the GetExtensionVersion documentation against AOSP implementation branches and the unchanged binding signature. The return-value and exception descriptions and cref targets are correct; no blocking issues found. Static source review only.
jonathanpeppers
deleted the
jonathanpeppers-review-android-os-subnamespaces-r074
branch
November 28, 2026 02:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
65a54c11ca61870ae12eec799a86a94aa9503f02↑ XML parses;
git diff --checkis clean; the cref target exists in BuildVersionCodes.xml.↑ gemini-4-argon review found no issues.
↓ Copilot review is not done yet.
VERSION_CODES.R, so the old text "zero when no version is available for that identifier" is wrong for those identifiers.↓ No user report; the error comes from the review only.
Pass-3 review of campaign item R074: Android.OS.Ext, Android.OS.Flagging, Android.OS.Health, Android.OS.MultiSensory, Android.OS.Storage and Android.OS.Storage.Operations (36 files, 592 AI-changed channels, 434 review rows).
Fix
M:Android.OS.Ext.SdkExtensions.GetExtensionVersion(System.Int32)indocs/xml/Android.OS.Ext/SdkExtensions.xml:<returns>text said the method returns zero "when no version is available for that identifier". This is wrong for identifiers belowVERSION_CODES.R. AOSPSdkExtensions.javahas@throws IllegalArgumentException if extension is not a valid extension(line 124), and the method throws whenextension < VERSION_CODES.R(lines 127-128). The method returns 0 only for identifiers at R or higher that have no version (line 155; the system properties default to 0 at lines 58-66).<returns>: "The version of the specified extension, or 0 when the extension identifier isBuildVersionCodes.Ror higher and the device has no version for it."<exception cref="T:Java.Lang.IllegalArgumentException">, with the@throwstext from line 124. The placement followsEnvironment.xml.Uncertain items
None. The R054 note about
AppDataFileSourcerelative paths does not apply here:FileOperationResult.Sourceonly namesAppDataFileSourceas an example, word for word fromFileOperationResult.java:190-191.Checks
StorageManager.GetStorageVolumesIncludingSharedProfilessaysMANAGE_EXTERNAL_STORAGE, which matches@RequiresPermissionatStorageManager.java:1382.git diff --checkis clean, and the change adds noTo be addedplaceholders.