- Display the SaveUI on all users.
- Dismiss the UI when switching users.
- Fix security check on disableOwnedAutofillServicesLocked()
Test: manual verification
Change-Id: I4e9167314f1feeda618db6c57735cc31d84486c1
Fixes: 62828906
The AutofillSession.getFillEventHistory() method returns only the event history
for the last onFillRequest(). In the scenario where the user switches
activities and the server has multiple sessions open, only the events for the
last session should be recorded.
Test: existing CtsAutoFillServiceTestCases pass
Test: LoginActivityTest.checkFillSelectionFromPreviousSessionIsDiscarded
Fixes: 62802026
Change-Id: I447ed77c2167095867b35d616b5cf2ae43aa28db
Session was using findViewNodesByAutofillIds(ids) before, which not only was
not optimal, but error prone (for example, it could return a non-empty array
with an empty value).
Test: CtsAutoFillServiceTestCases pass
Fixes: 62532979
Change-Id: If984f1263cc3f2aac1d1e098687fe02d73c55211
Otherwise, it will fail to call onSaveRequest() in scenarios where the service
required a field that was pre-populated for the app. For example, when the
service requires both a username and password, the app pre-populates the
username, and the user fills the password.
Test: new LoginActivityTest.testSaveOnlyTwoRequiredFieldsOnePrefilled() pass
Test: existing CtsAutoFillServiceTestCases pass
Bug: 62270740
Change-Id: Idbb11a8c2dab6741c18549c55dfdb71b483c2447
WindowManager throws an IllegalStateException when adding a view twice; this
should never happen (since show() and hide() are always called in the UIThread),
but when it does, it should not crash the system.
Test: existing CtsAutoFillServiceTestCases pass
Fixes: 62262781
Change-Id: Idfd246ff173f4abb606865b7ba8cc367eb6acaad
When the user manually requested autofill and the service returned just 1
dataset, the app was automatically filled with it.
The motivation here was that since the user explicitly asked for autofill,
it'd ok - and better for the user - to release the data to the app without
the selecting a dataset.
This assumption was ok initially, but now the API to manually request autofill
is public, so a malicious app could use to get autofill data without user
interation.
Test: CtsAutoFillServiceTestCases pass
Fixes: 62164695
Change-Id: I47c3d8c557533526572aa67a4240c0a57f54268d
Test: manual verification with experimental app
Test: manual verification with Autofill with Google on flashed deviced
Test: existing CtsAutoFillServiceTestCases pass
Test: new LoginActivityTest.testSetupComplete pass
Fixes: 62049772
Change-Id: I1e914c44062755f8c88656482338e76aeaafd543
That could happen when app throws an exception while filling it.
Fixes: 38312929
Test: manual verification by forcing an app to throw an exception
Change-Id: I7e94e9d352c4c3fd8adf01bcf7b25f66535e070d
AutofillManager keeps track of which views the AutofillServiec is interested to
save, so when these views are gone, the session is finished.
But when the AutofillService returns a dataset whose views it can not save,
the FillUi for these views are not hiding when the views are gone. This CL
fixes this issue by:
- Keeping track which non-savable views should be tracked.
- Pass the view (instead of it's id) when the UI on such views should be hid.
This CL also optimized some AIDL and internal calls by avoiding the creating of
unnecessary Lists.
Test: manual verification with Snapchat
Test: existing CtsAutoFillServiceTestCases pass
Test: new tests on MultipleFragmentLoginTest pass
Fixes: 38199452
Change-Id: I78fa357962dbc6667146d8e08cd6bacb63e0f337
When the autofill service returns a null FillResponse, the session is marked
"gone" because the service cannot autofill it. But there might be cases where
the view structure change and it's now autofillable, so need to allow users
to manually request autofill again in such cases.
Fixes: 38205945
Test: CtsAutoFillServiceTestCases pass
Test: LoginActivityTest.testAutofillManuallyAfterServiceReturnedNoDatasets()
Test: LoginActivityTest.testAutofillManuallyAndSaveAfterServiceReturnedNoDatasets()
Change-Id: I9b23c255e563dd0646bf266d31ddb10dcc4f7f6d
- Fixed PFLAG3_NOTIFY_AUTOFILL_ENTER_ON_LAYOUT value - it was overlapping with
PFLAG3_ASSIST_BLOCKED.
- Added missing permission on methods called by Shell command.
- Improved debugging.
Bug: 38173625
Test: android.autofillservice.cts.MultipleFragmentLoginTest#loginOnTwoFragments
Change-Id: Ie7880c97d38298e06134709c5c2e9e38fa1bacbb
E.g. more than one session by activity token
Also
- use cheaper datastructure to store sessions temporarily.
- Fix dumping when there are not responses
Fixes: 38203308
Test: Created two sessions, put them in background. Killed the apps, killed the tasks.
Waited 30 second and started new sessions -> Saw sessions pruned.
Change-Id: I8fe94773a3381617779e5bdded317f3744c831e5
...and also added shell cmds to set it so it can be CTS-tested.
Bug: 37997043
Test: manual verification
Test: PartitionedActivityTest.testNoMorePartitionsAfterLimitReached()
Test: CtsAutoFillServiceTestCases pass
Change-Id: I783bd2d3ed248484adeeebd2df425a6304362ad9
We now
- cache AutofillId -> ViewNode
- look for all AutofillIds at the same time (instead of one by one)
Bug: 37997043
Test: CtsAutoFillServiceTestCases
Change-Id: I094468ad885eed0cc506b4b62ff09c4af48570ff
If a dataset needs to be authenticated the fill service
may not have the values but needs to tell the system for
which fields to show the fill UI. We now allow passing
a null value to mean the view is a part of the dataset
semantically but its value should remain unchanged.
If a dataset has no values, i.e. the related autofill ids
are mapped to null, we cannot properly filter. In this case
we always match such items regardless what the user typed.
While at this improved accessibility support for filtering
to announce when the number of items being filtered changes.
Also while at this allowed a dataset authentication to return
a response which replaces the current response and refreshes
the UI. Matching datasets with null values to any text plus
allowing a response to be returned from a dataset auth enables
the use case where there is always "Import" item at the
end of the list which when clicked can show arbitrarily more
data entries associated to other apps.
Another change is that we now provide the client state
bundle on both request and dataset auth.
Finally, this change gets rid of dataset waiting auth and
response waiting auth concepts since the reference to the
response and the dataset is piped with the auth request.
Fixed a bug where the width of the autofill UI was not
properly measured by going over all items in the adapter.
Now we measure enough height to fit the first three and the
width id the width of the widest item in the adapter.
Test: Added LoginActivityTest#testDatasetAuthTwoFieldsReplaceResponse
Added LoginActivityTest#testDatasetAuthTwoFieldsNoValues
Added LiginActivityTest#filterTextNullValuesAlwaysMatched
All autofill CTS tests pass
bug:37724701
bug:37424539
Change-Id: Ic19e5d7cbdbb7d110c9e7da0ad60b540cbf1aecf
we have a link to the client which is enough to find the views.
Also there was some cases where the windowToken was not updated
properly. This is moot now.
Also: Read a array of views from the client to speed up the
client<->AutofillManager communication.
Fixes: 38070352
Test: CtsAutoFillServiceTestCases
1 Started autofill, saw fill UI
2 Home button
3 Kill activity in background
4 Recents -> back to activity
5 Saw fill UI restored
Change-Id: I7c2c9411204fa5d65867efae9b7296399121c3a2
This makes sure that only the session that current owns the UI can make
changes to the UI:
The callback is the ID of the current owner. The only caller that does
not ID itself (and thereby causes the Ui to close in any way) is the
ACTION_CLOSE_SYSTEM_DIALOGS path.
Change-Id: Ib396864411f362b59deb500251c37896ecbc7de7
Fixes: 38042845
Test: CtsAutoFillServicesTestCases
Also use getUiForShowing() on all relevant places, and added missing
SaveDataType value.
Test: LoginActivityTest.testFillResponseAuthServiceHasNoData()
Test: manual verification
Fixes: 37711385
Fixes: 38009452
Change-Id: Id69c831f96fb9ac35d1f2d86cfd41e76428c776e