[PM-39612] fix: resolve autofill container-hint redirect to autofillable child#7146
[PM-39612] fix: resolve autofill container-hint redirect to autofillable child#7146aj-rosado wants to merge 3 commits into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the autofill container-hint redirect fix across Code Review DetailsNo findings at or above the confidence threshold. The change is well-scoped, follows existing traversal conventions, and the deduplication of both |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7146 +/- ##
==========================================
- Coverage 86.76% 86.48% -0.29%
==========================================
Files 868 912 +44
Lines 63975 65511 +1536
Branches 9585 9610 +25
==========================================
+ Hits 55511 56654 +1143
- Misses 5023 5412 +389
- Partials 3441 3445 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39612
📔 Objective
Some Android apps wrap their login
EditTextfields inside a container view (e.g., MaterialTextInputLayout). The container carries the semantic autofill hint (USERNAME,PASSWORD) but hasautofillType = NONE (0), meaning it cannot receive a fill value. The innerEditTexthasautofillType = TEXT (1)but no hint, so heuristics never classify it. As a result, autofill silently failed — the fill dataset was built against the container'sautofillIdwithautofillType = 0, which the framework dropped at fill time.Changes:
ViewNodeExtensions.kt: When a container node carries a semantic hint but hasautofillType = NONE,findFirstAutofillableChild()locates the first descendant withautofillType = TEXT. The child'sautofillIdandautofillTypeare used inAutofillView.Dataso the fill reaches the actual input field.AutofillParserImpl.kt: AddedclaimedAutofillIdstracking during traversal to prevent a child node from being added a second time after the container has already redirected to it.