Fix AugmentedAutofillService onFillRequest() wrong focused AutofillId for WebView
When AutofillManagerService try to trigger AugmentedAutofill, it uses AutofillId.withoutSession() to get the AutollId without session. It will return invalid "parentId:NO_ID" if the virtual AutofillId is created with FLAG_IS_VIRTUAL_INT. The virtual AutofillId flag should be FLAG_IS_VIRTUAL_INT or FLAG_IS_VIRTUAL_LONG, we should get mVirtualIntId for FLAG_IS_VIRTUAL_INT or mVirtualLongId for FLAG_IS_VIRTUAL_LONG. Bug: 156408900 Test: atest android.autofillservice.cts.augmented Test: atest android.view.autofill.AutofillIdTest#\ testVirtual_Long_withoutSession Test: atest android.view.autofill.AutofillIdTest#\ testVirtual_Int_withoutSession Test: Manual. Write a simple cts test for webview and check the focused AutofillId is correct while switching between the field. Change-Id: I7ebb4d7cfb6d6f383724b798dae69269ae3a27be
Loading
Please register or sign in to comment