Skip to content

Fix documentation errors in Android.Net.Wifi.Rtt (R082, pass 3) - #1962

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-android-net-wifi-rtt-docs
Nov 28, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-android-net-wifi-rtt-docs

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 183da8243f6e69b4279594235b60e1269895737e

Dimension Assessment Rationale
Change confidence 9/10 ↑ Each of 6 edits is a single sentence span with pinned source lines.
↑ Changed XML parses; git diff --check is clean.
↑ Independent rubber-duck review found no errors.
↓ CI and Copilot review not inspected yet.
Diagnosis confidence 9/10 ↑ AOSP decoder 2^(21-x) and 2^(8-x) is the same since API 29, so the Android 16/17 qualifier is wrong.
↑ dotnet/android Object.cs and JNIEnv.cs show transfer controls release and registration, not ownership transfer.
Evidence fit 9/10 ↑ Both defects are exact text claims that the pinned sources contradict.

Pass-3 review of item R082: docs/xml/Android.Net.Wifi.Rtt (30 files, 692 AI-changed channels; 138 deferred boilerplate).

Fixes (6 channels)

  1. ResponderLocation AltitudeUncertainty, 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_r01 ResponderLocation.java:98-100,573-574,629-640; the same lines are in android-10.0.0_r1 through android-17.
  2. CivicLocationKeys, RangingResultCallback, WifiRttManager (IntPtr, JniHandleOwnership) constructors, transfer param: the old text said ownership transfers to the instance. It does not: the peer copies the reference, only DoNotRegister is kept, and the incoming reference is released per transfer. Evidence: dotnet/android@9bc18c75 src/Mono.Android/Java.Lang/Object.cs:110-118, src/Mono.Android/Android.Runtime/JNIEnv.cs:360-372,381-392.

Uncertain findings

None.

Checks

  • Every changed XML file parses; git diff --check is clean; no new To be added. placeholders; index.xml not touched.
  • No implementation-source citations (googlesource, cs.android.com, aosp-mirror) in the namespace.
  • Ledger: one row per AI-changed channel with verdict, specific claim, and numeric pinned source line (548 correct, 6 fixed, 138 deferred).

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>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 06:25
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 06:25
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

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.

🟢 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 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.

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 as Math.pow(2, ALTITUDE_UNCERTAINTY_BASE - encodedValue) with ALTITUDE_UNCERTAINTY_BASE = 21 and no check for 0 (main L99, L642-643). The formula is identical in android-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_BASE 8 - 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 new transfer description is accurate. Java.Lang.Object.SetHandle uses transfer both 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. HeightAboveFloorUncertaintyMeters correctly 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
jonathanpeppers merged commit dce9d4c into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-android-net-wifi-rtt-docs branch November 28, 2026 06:44
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