Regularly check if the sessions are still valid and clear the ones that
are not.
Test: 1. Started session in dialer
2. Home button (dialer goes in background)
3. kill -9 dialer
4. Wait 30 seconds
5. Start session is messenger
6. dialer session stays
1. Started session in dialer
2. Home button (dialer goes in background)
3. kill -9 dialer
4. Swipe dialer from recents
5. Wait 30 seconds
5. Start session is messenger
6. dialer session is removed
Fixes: 38005472
Change-Id: I8199ce44777b313141ee1eab6c8de5ad5089474a
The PopupWindow anchoring offset should be based on the bottom of the anchor
view, but we were using top. Hence, the PopupWindow.tryFitVertical() was
failing to place it above the view in some cases, even when there was plenty
of space.
Fixes: 37991460
Test: manual verification with virtual view sample
Test: CtsAutoFillServiceTestCases pass
Change-Id: Iffdfe0d7858e865192338184d63bf5b93ba7108f
Now the width and height are capped to 0.9 of the screen
dimensions. The height is also adjusted as needed by the
popup window positioning logic.
Test: manual
bug:36660292
Change-Id: I54d032f4e9b9b8fae6f98846c470a1455babcb68
Such method would cause the AutofillUi to show on all fields, now it only
shows in the fields the service is interested on.
This doesn't solve FillResponse auth on multiple partition, but that will
come soon...
Bug: 37424539
Test: removed hack from testFillResponseAuthJustOneField()
Test: CtsAutoFillServiceTestCases pass
Change-Id: Id97dddfb9fc1630cd6bac96b9bae9d4a2986dd6d
Otherwise, all onFillRequest() calls in the same partition would use
the same flags.
Fixes: 37675138
Test: existing CtsAutoFillServiceTestCases pass
Test: CtsAssistTestCases pass
Test: PartitionedActivityTest.testAutofill4ParitionsMixManualAndAuto() pass
Change-Id: I03c8a036637bae534904d4f41265e451088cf940
Autofill manager service was not observing package changes thus
we did not properly handle the cases of the service being updated,
added, and removed. Handling, additions is needed to properly
support restore from a backup. Fixed a few missing locks.
Test: all autofill CTS tests pass and manually tested update, add,
and remove of autofill services.
bug:36638606
bug:36978445
Change-Id: Idd47891774ba2a4e562a1952cbb5a048211fd4e3
- Removed deprecated BIND_AUTO_FILL
- Renamed BIND_AUTOFILL to BIND_AUTOFILL_SERVICE
- Kept BIND_AUTOFILL as @hide
- Fixed the permission code
The permission check was actually ignored; it was probably broken when we
introduced support to settings.
Fixes: 37723410
Bug: 37563972
Test: manual verification with existing client
Test: CtsAutoFillServiceTestCases pass
Change-Id: If3abdcb0ae850f0a327bfdbb9ca6c44a24823047
Removed the ability for an autofill provider to set
a custom string for the negative button. Also make
the old hidden APIs non-abstract to avoid runime
crashes for unimplemented methods.
Test: CtsAutoFillServiceTestCases pass
bug:37649790
Change-Id: If776d26de48382eeb064bdead5d4d5fdb0ff2e7e
To make life easier the reponseId is not part of the FillResponse.
Test: CtsAutofillServiceTestCases (added test for multiple Contexts)
Change-Id: If09e00b7267d293e4234a7a9837ad88d73af1b24
Fixes: 36481649
Bug: 36481649
Test: CtsAutofillServiceTestCases (now with a test that has an autofill
session over two full screen fragments)
Change-Id: I55f2f6203f3bd5a7082b4ce90500d2c16a260c7d
- Removed default implementation of onProvideAutofillVirtualStructure() that
was using accessibility API (it's useless because without the View calling
AutofillManager.notifyViewEntered(), it would never be triggered).
- Fixed obsolete TODOs.
- Removed obsolete service class name constant.
- Removed unused debug constant.
Fixes: 37078783
Fixes: 33197203
Bug: 33802548
Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
- Check UID to make sure one service cannot read FillSelections of other
services
- Add id to Dataset to allow to tag the datasets. This id is then found
in the FillSelection.Event
- Add clientState to FillSelection to allow service to store more data
Fixes: 36871500
Test: CtsAutoFillServiceTestCases
Change-Id: Ice894245508227265294a1c59ea97842175e5aec
An service can option to finish the session once all views that it
declared as important. Views that are important are all autofillable
views of any partition and the saveable fields of the last partition.
Test: CtsAutoFillServiceTestCases
Fixes: 35708237
Change-Id: I0ccade8ebb427e5d8928697ef0007c75d3f83df0
When saving data filled by the user the platform provides to
an autofill provider the state of the UI allowing the provider
to interpret this state and store relevant information.
A limitation of the current design is that the fill provider
needs to interpret the screen content twice, once handling a
fill request and once handling a save request. To address this
we are introducing a id for each fill request allowing the
autofill provider to associate arbitrary state with each fill
request and store it in the client data bundle later passed
to save.
Another limitation of the current design is that if the screen
changes dynamically while the user interacts with the app the
UI state passed on save represents a static snapshot, therefore
it is not possible to the autofill provider to determine the
context in which the data in the UI was filled. We could
keep the views and have deltas for views being removed/added
/moved/changed but this is not enough as the fill provider
needs to know not only what changed but what changed for every
fill request and in one session there could be multiple fill
requests. To address this we provide a list of fill contexts
on save each of which has the id of the corresponding fill
request. This allows the fill provider to know the exact context
in which the data was popuplated and also use its custom client
state for this fill request if desired.
This change deprecates the old APIs and the new ones delegate
to the old ones. Once the clients migrate to the new APIs we
will remove the old ones.
Test: all autofill CTS tests pass
Change-Id: Idcebcc671aa3c078a305d8c358e225274fccc588
- The session might be gone by the time the handler is called, hence check
the sessionID
- Access getClientLocked() and mSession only under mLock.
Test: cts-tradefed run cts-dev AutoFillServiceTestsCases
Change-Id: I445a24557589afadb1f5372b63ef9db88021b609