Repository navigation
Fix documentation errors in Android.Net.Wifi.Rtt (R082, pass 3) - #1962
Merged
jonathanpeppers merged 1 commit intoNov 28, 2026
Merged
Conversation
Remove an unsupported Android 16 and 17 qualifier from three ResponderLocation uncertainty notes, and correct the transfer parameter text in three constructors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
@dalexsoto review |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for this documentation-only update to the Wi-Fi RTT API descriptions.
No open issues 🎉
What changed in this PR
This documentation-only PR corrects six descriptions in the Android.Net.Wifi.Rtt API reference without changing runtime behavior.
Changes:
- Removes the Android 16/17 restriction from uncertainty-decoding descriptions, reflecting behavior present since API 29.
- Clarifies that JNI constructor ownership flags control reference release and peer registration, rather than transferring the reference to the managed instance.
| File | Description |
|---|---|
| docs/xml/Android.Net.Wifi.Rtt/WifiRttManager.xml | Clarifies the constructor’s transfer parameter. |
| docs/xml/Android.Net.Wifi.Rtt/ResponderLocation.xml | Corrects version scope for altitude, latitude, and longitude uncertainty decoding. |
| docs/xml/Android.Net.Wifi.Rtt/RangingResultCallback.xml | Clarifies the constructor’s transfer parameter. |
| docs/xml/Android.Net.Wifi.Rtt/CivicLocationKeys.xml | Clarifies the constructor’s transfer parameter. |
Review effort: Balanced
dalexsoto
approved these changes
Nov 28, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
Approving. I checked each of the six edits against the AOSP sources and the binding runtime, and all are correct.
ResponderLocation.AltitudeUncertainty: "An encoded unknown uncertainty of 0 is decoded as 2,097,152, not 0" is correct. AOSP decodes it asMath.pow(2, ALTITUDE_UNCERTAINTY_BASE - encodedValue)withALTITUDE_UNCERTAINTY_BASE = 21and no check for 0 (main L99, L642-643). The formula is identical inandroid-10.0.0_r1(API 29), where the getter was introduced (ApiSince=29), so dropping the "Android 16 and 17" qualifier is right.LatitudeUncertainty/LongitudeUncertainty: "decoded as 256 degrees, not 0" is correct: 2^(LATLNG_UNCERTAINTY_BASE8 - 0) = 256. The Javadoc gives the unit as degrees, and the behaviour is the same in API 29 and main.(IntPtr, JniHandleOwnership)constructors (CivicLocationKeys,RangingResultCallback,WifiRttManager): the newtransferdescription is accurate.Java.Lang.Object.SetHandleusestransferboth to set the peer registration option (DoNotRegister) and to release the incoming reference (JNIEnv.DeleteRef(value, transfer)).- The rest of each file is consistent. No version-specific wording is left in
ResponderLocation.xml.HeightAboveFloorUncertaintyMeterscorrectly keeps "zero indicates unknown", because its decoder does map 0 to 0. No markup or cref changes.
I found no blocking issues. This was a static review; I didn't run any builds or tests.
jonathanpeppers
deleted the
jonathanpeppers-review-android-net-wifi-rtt-docs
branch
November 28, 2026 06:44
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:
183da8243f6e69b4279594235b60e1269895737e↑ Changed XML parses;
git diff --checkis clean.↑ Independent rubber-duck review found no errors.
↓ CI and Copilot review not inspected yet.
↑ dotnet/android Object.cs and JNIEnv.cs show
transfercontrols release and registration, not ownership transfer.Pass-3 review of item R082:
docs/xml/Android.Net.Wifi.Rtt(30 files, 692 AI-changed channels; 138 deferred boilerplate).Fixes (6 channels)
ResponderLocationAltitudeUncertainty,LatitudeUncertainty,LongitudeUncertainty: removed "On Android 16 and 17, ". The decoder maps encoded 0 to 2^21 = 2,097,152 (altitude) and 2^8 = 256 (lat/long) in every release since API 29, not only on Android 16 and 17. Evidence: android-37.2_r01ResponderLocation.java:98-100,573-574,629-640; the same lines are in android-10.0.0_r1 through android-17.CivicLocationKeys,RangingResultCallback,WifiRttManager(IntPtr, JniHandleOwnership)constructors,transferparam: the old text said ownership transfers to the instance. It does not: the peer copies the reference, onlyDoNotRegisteris kept, and the incoming reference is released pertransfer. Evidence: dotnet/android@9bc18c75src/Mono.Android/Java.Lang/Object.cs:110-118,src/Mono.Android/Android.Runtime/JNIEnv.cs:360-372,381-392.Uncertain findings
None.
Checks
git diff --checkis clean; no newTo be added.placeholders;index.xmlnot touched.