Skip to content

Import source-backed Android.Telephony documentation - #568

Open
jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-build-xml-doc-importer
Open

Import source-backed Android.Telephony documentation#568
jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-build-xml-doc-importer

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

Android.Telephony still contains a large number of placeholder documentation nodes, but filling them safely requires exact mapping to authoritative Android or Java API members rather than inferred or generic prose.

This change adds a conservative file-based C# importer and uses it to replace 1,189 placeholders across 125 Android.Telephony XML files. The importer matches managed members through type registrations, JNI names and descriptors, and JniField owner metadata; imports only documented channels from exact declared members; preserves existing prose and CRLF formatting; and reports ambiguous, inherited-only, managed-only, undocumented, or low-value source channels instead of guessing.

The command is dry-run by default and includes explicit apply scope, change limits, bounded fetching with retry/backoff and caching, offline operation, deterministic JSON/text reports, and local fixture self-tests. A post-apply dry-run is idempotent with zero additional changes.

Validation

  • 21 local fixture assertions pass for Android and Java methods/fields, mismatch and low-value channel skipping, XML preservation, source attribution, and CRLF atomic writes.
  • All 125 changed XML files parse successfully and retain CRLF line endings.
  • git diff --check passes.
  • docs/xml/index.xml is unchanged.
  • Added documentation was audited to reject type-only, nullability-only, See also, raw Javadoc, and generic fallback text.

Notes

2,024 placeholders remain intentionally untouched because authoritative pages or repository metadata do not support a high-confidence import. These include managed-only projections, exact official members with no usable prose, missing type registrations, low-value source channels, inherited-only members, and missing type descriptions.

Refs #230

jonathanpeppers and others added 3 commits August 15, 2026 09:26
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Import exact Android reference documentation for registered methods and fields while preserving conservative skips for managed-only and undocumented surfaces. Refs #230.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 16:33
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) August 15, 2026 16:35
@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.

Pull request overview

Adds a new conservative XML-doc importer workflow under tools/ and applies it to replace a large set of To be added. placeholders in docs/xml/Android.Telephony, aiming to import authoritative text from official Android/Java reference sources while preserving existing prose and formatting.

Changes:

  • Added importer documentation plus local fixtures intended to validate importer behavior.
  • Replaced many To be added. placeholders across Android.Telephony XML docs with imported summaries/params/remarks and reference links.
  • Added/expanded remarks content for many members (including Parcelable patterns like describeContents() / writeToParcel(...)).

Reviewed changes

Copilot reviewed 129 out of 130 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tools/importer.md Documents how to run the XML documentation importer.
tools/importer-fixtures/source.xml Fixture XML used to validate member matching and placeholder replacement behavior.
tools/importer-fixtures/java-reference.html Fixture Java reference HTML used by importer tests.
tools/importer-fixtures/android-reference.html Fixture Android reference HTML used by importer tests.
docs/xml/Android.Telephony/VisualVoicemailSmsFilterSettings+Builder.xml Imports docs for builder methods; adds remarks and Android reference links.
docs/xml/Android.Telephony/VisualVoicemailSmsFilterSettings.xml Imports docs for Parcelable methods like describeContents() / writeToParcel(...).
docs/xml/Android.Telephony/VisualVoicemailSms.xml Imports docs for Parcelable methods and property value docs.
docs/xml/Android.Telephony/VisualVoicemailService.xml Imports docs for service binding methods.
docs/xml/Android.Telephony/UssdResultCode.xml Replaces placeholder summaries/remarks for USSD error constants.
docs/xml/Android.Telephony/UsageSetting.xml Replaces placeholder summaries with imported text + reference links.
docs/xml/Android.Telephony/UiccPortInfo.xml Imports Parcelable docs and value docs for UICC port info.
docs/xml/Android.Telephony/UiccCardInfo.xml Imports Parcelable docs for UICC card info.
docs/xml/Android.Telephony/TelephonyScanManager+NetworkScanCallback.xml Imports callback parameter docs and adds Android reference links.
docs/xml/Android.Telephony/TelephonyScanManager.xml Replaces constructor placeholders with imported remarks + reference link/attribution.
docs/xml/Android.Telephony/TelephonyManagerErrorCode.xml Imports constant documentation + reference links.
docs/xml/Android.Telephony/TelephonyDisplayInfo.xml Imports Parcelable docs + reference link/attribution.
docs/xml/Android.Telephony/TelephonyCallback+IDataActivityListener.xml Imports parameter docs for callback listener methods.
docs/xml/Android.Telephony/TelephonyCallback.xml Replaces constructor placeholders with imported remarks + reference link/attribution.
docs/xml/Android.Telephony/SubscriptionType.xml Imports constant summaries/remarks + reference links.
docs/xml/Android.Telephony/SubscriptionStatus.xml Imports constant summaries/remarks + reference links.
docs/xml/Android.Telephony/SubscriptionManager.xml Imports some param/return docs and adds Android reference links.
docs/xml/Android.Telephony/SubscriptionInfo.xml Imports Parcelable docs (describeContents, writeToParcel) + reference links.
docs/xml/Android.Telephony/SmsMessage+MessageClass.xml Imports return/value docs and adds Android reference link/attribution.
docs/xml/Android.Telephony/SmsMessage.xml Imports return type docs for factory/accessor methods.
docs/xml/Android.Telephony/SmsManager.xml Imports parameter docs for PendingIntent params and other placeholders.
docs/xml/Android.Telephony/SmsEncoding.xml Imports constant summaries/remarks + reference links.
docs/xml/Android.Telephony/SignalThresholdInfo.xml Imports Parcelable docs + reference link/attribution.
docs/xml/Android.Telephony/SignalStrengthUpdateRequest+Builder.xml Imports builder method docs + reference links.
docs/xml/Android.Telephony/SignalStrengthUpdateRequest.xml Imports Parcelable docs + reference link/attribution.
docs/xml/Android.Telephony/SignalStrength.xml Imports return docs and other placeholders.
docs/xml/Android.Telephony/ServiceState.xml Imports parameter docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/ServiceCapabilityType.xml Imports constant summaries/remarks + reference links.
docs/xml/Android.Telephony/RadioAccessSpecifier.xml Imports Parcelable docs, return docs, and writeToParcel docs.
docs/xml/Android.Telephony/PremiumCapability.xml Imports premium capability constant documentation + reference link/attribution.
docs/xml/Android.Telephony/PreciseDataConnectionStateNetworkValidation.xml Imports enum/constant summaries/remarks + reference links.
docs/xml/Android.Telephony/PhoneStateListener.xml Imports parameter docs for callbacks.
docs/xml/Android.Telephony/PhoneState.xml Imports enum/constant summaries/remarks + reference links.
docs/xml/Android.Telephony/PhoneNumberUtils.xml Imports parameter and return docs for phone number utilities.
docs/xml/Android.Telephony/PhoneNumberSource.xml Imports enum/constant summaries/remarks + reference links.
docs/xml/Android.Telephony/PhoneNumberFormattingTextWatcher.xml Imports parameter docs and adds Android reference link.
docs/xml/Android.Telephony/PhoneNumberFormat.xml Imports enum/constant summaries/remarks + reference links.
docs/xml/Android.Telephony/NetworkScanType.xml Imports scan-type constant documentation + reference links.
docs/xml/Android.Telephony/NetworkScanRequest.xml Imports Parcelable docs, return/value docs, and writeToParcel docs.
docs/xml/Android.Telephony/NetworkRegistrationInfoNrState.xml Imports NR state constant summaries/remarks + reference links.
docs/xml/Android.Telephony/NetworkRegistrationInfoDomain.xml Imports domain constant summaries/remarks + reference links.
docs/xml/Android.Telephony/NetworkRegistrationInfo.xml Imports Parcelable docs + reference links.
docs/xml/Android.Telephony/NeighboringCellInfo.xml Imports parcel constructor param docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/MultiSimMode.xml Imports multi-SIM mode constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IwlanIdType.xml Imports IWLAN ID type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IwlanEpdgAddressType.xml Imports ePDG address-type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IwlanEpdgAddressPreference.xml Imports ePDG address preference constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IwlanAuthenticationMethod.xml Imports IWLAN authentication method constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IncludeLocationDataType.xml Imports include-location-data constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceSrvccSupport.xml Imports IMS SRVCC support constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceSessionRefreshMethod.xml Imports session refresh method constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceSessionRefresherType.xml Imports refresher type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceSessionPrivacyType.xml Imports session privacy type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoicePayloadFormat.xml Imports payload format constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceEvsOperationalMode.xml Imports EVS operational mode constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsVoiceConferenceSubscribeType.xml Imports conference subscribe type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsRequestUriFormat.xml Imports request-URI format constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsPreferredTransport.xml Imports preferred transport constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsNetworkType.xml Imports IMS network-type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsIpsecEncryptionAlgorithm.xml Imports IPSec encryption algorithm constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsIpsecAuthenticationAlgorithm.xml Imports IPSec authentication algorithm constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsGeolocationPidfFor.xml Imports geolocation PIDF-related constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsEmergencyVoWifiRequires.xml Imports VoWi-Fi emergency requirement constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsEmergencyScanType.xml Imports emergency scan type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ImsEmergencyDomain.xml Imports emergency domain constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IccOpenLogicalChannelResponseStatus.xml Imports status constant summaries/remarks + reference links.
docs/xml/Android.Telephony/IccOpenLogicalChannelResponse.xml Imports Parcelable return docs + reference link/attribution.
docs/xml/Android.Telephony/DuplexMode.xml Imports duplex mode constant summaries/remarks + reference links.
docs/xml/Android.Telephony/DataRoamingMode.xml Imports roaming mode constant summaries/remarks + reference links.
docs/xml/Android.Telephony/DataLimitBehavior.xml Imports limit behavior constant summaries/remarks + reference links.
docs/xml/Android.Telephony/DataConnectionStatus.xml Imports data connection status constant summaries/remarks + reference links.
docs/xml/Android.Telephony/D2DSharing.xml Imports D2D sharing constant summaries/remarks + reference links.
docs/xml/Android.Telephony/ClosedSubscriberGroupInfo.xml Imports Parcelable docs + reference links.
docs/xml/Android.Telephony/CellSignalStrengthWcdma.xml Imports equals/hashCode/getLevel docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/CellSignalStrengthTdscdma.xml Imports equals/hashCode/getLevel docs and writeToParcel param docs + reference links.
docs/xml/Android.Telephony/CellSignalStrengthLte.xml Imports equals/hashCode/getLevel docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/CellSignalStrengthGsm.xml Imports equals/hashCode/getLevel docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/CellSignalStrengthCdma.xml Imports equals/hashCode/getLevel docs and Parcelable return docs + reference links.
docs/xml/Android.Telephony/CellSignalStrength.xml Imports equals/hashCode/getLevel docs and adds reference links/attribution.
docs/xml/Android.Telephony/CellLocation.xml Imports property value docs.
docs/xml/Android.Telephony/CellInfoTdscdma.xml Imports writeToParcel param docs.
docs/xml/Android.Telephony/CellInfoNr.xml Imports writeToParcel docs + reference link/attribution.
docs/xml/Android.Telephony/CellInfo.xml Imports Parcelable return docs.
docs/xml/Android.Telephony/CellIdentity.xml Imports Parcelable return docs and parceling param docs.
docs/xml/Android.Telephony/CellConnectionStatus.xml Imports connection status constant summaries/remarks + reference links.
docs/xml/Android.Telephony/CarrierImsSmsFormat.xml Imports IMS SMS format constant summaries/remarks + reference links.
docs/xml/Android.Telephony/BarringType.xml Imports barring type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/BarringInfo+BarringServiceInfo.xml Imports Parcelable docs and writeToParcel docs + reference links.
docs/xml/Android.Telephony/BarringInfo.xml Imports Parcelable docs, param docs, writeToParcel docs + reference links.
docs/xml/Android.Telephony/AvailableNetworkInfo+Builder.xml Imports builder method docs + reference links.
docs/xml/Android.Telephony/AvailableNetworkInfo.xml Imports value docs and Parcelable docs + reference links.
docs/xml/Android.Telephony/AutheenticationType.xml Imports authentication-type constant summaries/remarks + reference links.
docs/xml/Android.Telephony/AccessNetworkConstants+NgranBands.xml Imports band constant docs + reference links/attribution.
docs/xml/Android.Telephony/AccessNetworkConstants+GeranBand.xml Imports band constant docs + reference links/attribution.
docs/xml/Android.Telephony/AccessNetworkConstants+EutranBand.xml Imports band constant docs + reference links/attribution.
docs/xml/Android.Telephony/AccessNetworkConstants+AccessNetworkType.xml Imports network-type constant docs + reference links/attribution.
Suppressed comments (1)

docs/xml/Android.Telephony/UiccPortInfo.xml:487

  • Same mixed-content issue as above: starts with raw text (Flatten this object…) followed by children. Wrapping the leading sentence in its own keeps the XML structure consistent.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

<summary>To be added.</summary>
<summary>A source of phone number: provided by IMS (IP Multimedia Subsystem) implementation.</summary>
<remarks>
<para>A source of phone number: provided by IMS (IP Multimedia Subsystem) implementation. When IMS service is registered (as indicated by RegistrationManager.RegistrationCallback.onRegistered(int) ) the IMS implementation may return P-Associated-Uri SIP headers (RFC 3455). The URIs are the user\u2019s public user identities known to the network (see 3GPP TS 24.229 5.4.1.2), and the phone number is typically one of them (see \u201cglobal number\u201d in 3GPP TS 23.003 13.4). This source provides the phone number from the last IMS registration. IMS registration may happen on every device reboot or other network condition changes. The number will be updated should the associated URI change after an IMS registration.</para>
<Docs>
<param name="originatingNumbers">To be added.</param>
<summary>To be added.</summary>
<param name="originatingNumbers">List</param>
Comment on lines +123 to +126
<remarks>Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/UiccPortInfo#describeContents()" title="Reference documentation">Android reference for <code>android.telephony.UiccPortInfo.describeContents</code>.</a></format></para>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
Comment on lines +66 to +70
<summary>Content and code samples on this page are subject to the licenses described in the Content License.</summary>
<remarks>Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/TelephonyScanManager#TelephonyScanManager()" title="Reference documentation">Android reference for <code>android.telephony.TelephonyScanManager.TelephonyScanManager</code>.</a></format></para>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
Comment on lines +79 to +83
<summary>Content and code samples on this page are subject to the licenses described in the Content License.</summary>
<remarks>Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/TelephonyCallback#TelephonyCallback()" title="Reference documentation">Android reference for <code>android.telephony.TelephonyCallback.TelephonyCallback</code>.</a></format></para>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
Comment on lines 188 to 192
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
<para>Sets the client prefix for the visual voicemail SMS filter. The client prefix will appear at the start of a visual voicemail SMS message, followed by a colon(:).</para>
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/VisualVoicemailSmsFilterSettings.Builder#setClientPrefix(java.lang.String)" title="Reference documentation">Android reference for <code>android.telephony.VisualVoicemailSmsFilterSettings.Builder.setClientPrefix</code>.</a></format></para>
</remarks>
Comment on lines 269 to 275
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
<para>Sets the originating number allow list for the visual voicemail SMS filter. If the list is not null only the SMS messages from a number in the list can be considered as a visual voicemail SMS. Otherwise, messages from any address will be considered.</para>
<para>Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</para>
<para>Last updated 2026-08-03 UTC.</para>
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/VisualVoicemailSmsFilterSettings.Builder#setOriginatingNumbers(java.util.List&lt;java.lang.String&gt;)" title="Reference documentation">Android reference for <code>android.telephony.VisualVoicemailSmsFilterSettings.Builder.setOriginatingNumbers</code>.</a></format></para>
</remarks>
Comment on lines 181 to 187
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
<para>Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap. The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.</para>
<para>Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</para>
<para>Last updated 2026-08-03 UTC.</para>
<para><format type="text/html"><a href="https://developer.android.com/reference/android/telephony/CellSignalStrength#hashCode()" title="Reference documentation">Android reference for <code>android.telephony.CellSignalStrength.hashCode</code>.</a></format></para>
</remarks>

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

The complete importer/output pass found five blocking data-loss or corruption paths:

  • Enum-field prose, links, and attribution are emitted in <remarks>, which ECMA2Yaml ignores; this drops imported content for hundreds of fields (tools/importer.cs:630).
  • Table parsing accepts headings, bare types, and empty descriptions as docs, including two TelephonyManager returns imported as Parameters instead of the NetworkScan result (tools/importer.cs:1541).
  • Regex HTML stripping corrupts generic-type links and leaves )"> fragments (tools/importer.cs:1813).
  • The final API section consumes page footer/trademark/"Last updated" content when no later heading exists (tools/importer.cs:1481).
  • Literal \\uXXXX sequences are published instead of decoded punctuation (tools/importer.cs:689).

Please fix these importer paths and regenerate the affected XML with publishing-output validation.

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