Repository navigation
Fix documentation errors in Android.Hardware.Biometrics (R117, pass 3) - #1997
Conversation
Replace raw Class#MEMBER link text with crefs or dotted names, and fix the EmbeddedBiometricPrompt.AuthSessionId value text (unset value is -1). 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 reported for the biometric API documentation refinements.
No open issues 🎉
What changed in this PR
This third-pass update refines Android.Hardware.Biometrics API documentation following the earlier corrections. It improves references and clarifies an unset session value without changing API behavior.
Changes:
- Replace raw Java member references with managed API links.
- Normalize Java reference notation in authentication and role documentation.
- Document
-1as the value returned when no existing authentication session ID is set.
| File | Description |
|---|---|
| docs/xml/Android.Hardware.Biometrics/EmbeddedBiometricPrompt+AuthenticationCallback.xml | Link the callback summary to StartAuthenticationSession. |
| docs/xml/Android.Hardware.Biometrics/EmbeddedBiometricPrompt.xml | Clarify the unset session ID and link to SetLogoRes. |
| docs/xml/Android.Hardware.Biometrics/BiometricPromptStyleSpec+InterfaceConsts.xml | Link parcelable constants to their related managed methods. |
| docs/xml/Android.Hardware.Biometrics/BiometricPrompt+Builder.xml | Normalize the Java authentication reference notation. |
| docs/xml/Android.Hardware.Biometrics/BiometricPrompt.xml | Link fallback-option documentation to Builder.AddFallbackOption. |
| docs/xml/Android.Hardware.Biometrics/BiometricManager.xml | Normalize role constant references in sensor-strength remarks. |
Review effort: Balanced
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed all 6 changed Android.Hardware.Biometrics files at d211ee1 against the pinned AOSP source-37.2_r01 sources and the head docs set. All 5 new crefs resolve to exactly one existing member, none of them obsolete (BiometricPrompt.Builder.AddFallbackOption(ICharSequence,Int32,IExecutor,IDialogInterfaceOnClickListener), BiometricPromptStyleSpec.DescribeContents/WriteToParcel(Parcel,ParcelableWriteFlags), EmbeddedBiometricPrompt.StartAuthenticationSession(...), EmbeddedBiometricPrompt.Builder.SetLogoRes(Int32)). Each one replaces the matching upstream Javadoc link, e.g. getFallbackOptions links to addFallbackOption(CharSequence, int, Executor, DialogInterface.OnClickListener) (BiometricPrompt.java:572-576, :1334-1337). The ExistingAuthSessionId value is correct: the getter defaults to the hidden BiometricConstants.BIOMETRIC_REQUEST_ID_UNSET, which is -1 (BiometricConstants.java:359-360; EmbeddedBiometricPrompt.java:183, :659-668). The BiometricManager and BiometricPrompt.Builder remarks changes are notation-only and match their upstream text. No blocking issues.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
d211ee1a0bba58c3a760b01f42cc890bb6df935a↑ All 6 changed XML files parse;
git diff --checkis clean; all cref targets exist and are not obsolete.↑ gemini-4-argon rubber duck found no problems.
↓ OpenPublishing.Build result is pending.
Pass-3 review of item R117:
Android.Hardware.Biometrics(22 files). Earlier passes: #1624 (pass 1), #1807 (pass 2).Scope
git diff 86f7744a1 origin/main): 675 channels, one ledger row each.BiometricPromptinherits fromBiometricConstants(BiometricPrompt.java:79). 9 of these also have a hand judgment (see below).JniPeerMembers,ThresholdClass,ThresholdType) were judged by hand against the dotnet/android generator and runtime sources; all are correct.source-37.2_r01(SHA2569d637c3a…4e84), dotnet/android@9bc18c7 (Object.cs, JNIEnv.cs, generator, IJavaPeerable.xml).Fixes (9 channels, 6 files)
RoleManager#ROLE_WALLET,#ROLE_DEVICE_POLICY_MANAGEMENTraw link text → dotted namesBiometricPrompt#authenticate(...)→BiometricPrompt.authenticate(...)Builder#addFallbackOption(...)→ cref toBuilder.AddFallbackOption#describeContents(),#writeToParcel→ crefs toBiometricPromptStyleSpec.DescribeContents/WriteToParcelEmbeddedBiometricPrompt#startAuthenticationSession(...)→ cref-1when no session id is set. The old text named a constant that apps cannot see.@Hideinterface), :359-360 (BIOMETRIC_REQUEST_ID_UNSET = -1)Builder#setLogoRes(int)→ cref toBuilder.SetLogoRes(Int32)Pass-2 fixes in #1807 were checked again and are correct.
Checked and kept (no text change)
These were uncertain in pass 2. Each is now decided as correct:
BiometricPrompt.Builder.SetAllowedAuthenticatorsandSetDeviceCredentialAllowedremarks say some combinations "make it an error". This is a caller contract from the Javadoc (BiometricPrompt.java:687-689, 718-722). Clientbuild()(:898-909) checks only the title, but it does not allow the combination either, so the text is not contradicted (same rule as an unchecked@NonNull).EmbeddedBiometricPrompt.Builder.SetTitle(both overloads) says "Required" (EmbeddedBiometricPrompt.java:270-278,@NonNullat :278). Embeddedbuild()(:542-568) does not check the title, but "Required" is a caller contract. Kept.EmbeddedBiometricPrompt.IsConfirmationRequiredreturns the value set bySetConfirmationRequired(EmbeddedBiometricPrompt.java:767-768; BiometricPrompt.java:674-676, 1437-1438), so the text is correct. The embedded success callback says "Called when a biometric is recognized" (EmbeddedBiometricPrompt.java:1397). The same receiver also reports device-credential success (BiometricPrompt.java:966-977, 1633-1637), so the upstream text is not complete, but it is not false. Kept.Checks
git diff --checkis clean. BOM and CRLF are kept. No newTo be added.index.xml,_filter.xmlorFrameworksIndex.transferparam text is correct (Object.cs:110-118); no obsolete crefs in AI text (46 checked); no enum-return overpromises.assistant_usage_events), no findings.