Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 44bb9d3b authored by Alex Salo's avatar Alex Salo Committed by Cherrypicker Worker
Browse files

Fix Autofill AssistStructure visibility calculation.

In certain scenarios, the AssistStructure is not full: views that are marked as unimportant for Autofill are skipped.

When calculating the view position, current code adjusts it based on the skipped parent views: adding up the offsets from all the skipped parents into the view's own offset.

That works fine but does not take into account another way the parent is important. When the skipped parent view is scrollable and is scrolled to a non-zero position, it will result in the child view having its "left" property offset by parent's "scroll". When we subsequently skip the parent view from the AssistStructure, that information is forever lost, and the child view appears invisible in the AssistStructure.

The solution to this is to compensate the for the parent's "scroll" property.

Example (simplified for brevity):
parentView {
  left: 0
  scrollX: 1400
  childView {
    left: 1400
    scrollX: 0
  }
}
After skipping the parent, with this fix:
childView {
  left: 0
  scrollX: 0
}

Fixes: 294448060
Test: atest CtsAssistTestCases and on physical apps that are impacted
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:37cde4db5bdfefb58b0b1b4b280477a4f0df7911)
Merged-In: I4a60c834c001172729d6da9cc0ad36388c1acf4f
Change-Id: I4a60c834c001172729d6da9cc0ad36388c1acf4f
parent 25ac7716
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment