[Autofill Framework] Add a cache to store the last non-empty value when field is cleared
Change ag/25316443 fixes the issue where some apps clear the form
destroying the activity. However a side effect directly ignoring setting
current value is filtering behavior is also affected. See
go/ignore_view_state_reset_launch_analysis for detail.
This change introduce a cache to store the last non-empty text
value before a field is cleared to decouple the filtering behavior and
saving behavior.
CTS run passes except a known failure:
https://android-build.corp.google.com/abtd/run/L40200030003674139/
Bug:b/339448682
Test: atest CtsAutoFillServiceTestCases && local validation
Change-Id: I04a01fdd790edaec11f499cdad0f9c77973d6107
2 files changed