Improved AutoFill Save workflow.
Currently, the onProvideAutoFillStructure() methods can be called twice: to auto-fill an activity and to save the activity's data in the service. The problem with this approach is that when the save workflow is called, the activity might have been gone. Hence, a proper approach is to keep the initial AssistStructure data in the system_service memory, watch for view changes, and then passed the new structure back to the AutoFillService. A side effect of this change is that we need another way to determine if the view is sanitized or not. For "standard" views, that will be defined based on whether the view content come from a resource or not, but that logic is not implemented yet (for now, all views will be considered sanitized, except for TextView passwords). For "custom" views (such as WebView), this logic is responsibility of the view implementation, through the newChild() method, which now takes a flag (whose value could be AUTO_FILL_FLAG_SANITIZED for sanitized views). The SaveCallback.onSuccess() method was simplified: it does not need a list of saved ids anymore the auto-fill UI will not use it anymore. Another side effect is that the Save notification is gone - until it's attached again, it can be test by using: adb shell cmd autofill save Finally, hook AutoFillUI on ACTION_CLOSE_SYSTEM_DIALOGS events. BUG: 33269702 BUG: 31001899 Test: manual verification Test: CtsAutoFillServiceTestCases passes Change-Id: I907a7e21d1b3cd1ab6dec3a08d144a52655da46f
Loading
Please register or sign in to comment