History log of /frameworks/base/core/java/android/service/autofill/Dataset.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2ef19c1d73f89ca4718b5a8f0c2e7221621e844f 05-Jun-2017 Felipe Leme <felipeal@google.com> Improved documentation for AutofillService package:

- Moved (and expanded) overall documentation from FillResponse to
AutofillService.
- Improved SaveInfo documentation.
- Improved FillRequest documentation.
- Improved Dataset documentation.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: I157893deac06a5ed5e1cb7fd082da485f227b9ee
/frameworks/base/core/java/android/service/autofill/Dataset.java
a9379d0b44ca1f68a0036d2b65218e17fa348514 10-May-2017 Svetoslav Ganov <svetoslavganov@google.com> Allow null fill values to support authentication case

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
/frameworks/base/core/java/android/service/autofill/Dataset.java
9f9ee25515591ef33281708c0ab911962f4364a6 27-Apr-2017 Felipe Leme <felipeal@google.com> Improved Autofill logging.

- Removed ui.Helper.
- Replaced DEBUG and VERBOSE constants by sDebug and sVerbose.
- Added a shell command to dynamically set the constants.
- Removed obsoleted log statements.
- Changed log-level of some log entries.
- Removed unused methods.

Fixes: 36141126

Test: CtsAutoFillServiceTestCases pass
Test: manual verification

Change-Id: Ic08ee9a2adc10e63f49bbcc7ed126455462dc9c1
/frameworks/base/core/java/android/service/autofill/Dataset.java
cc684ed41f17ccdce45a056fd4034efc35b213d5 17-Apr-2017 Philip P. Moltmann <moltmann@google.com> Add a way to read the last AutofillSelection.

- 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
/frameworks/base/core/java/android/service/autofill/Dataset.java
f78e952d8df7074aa7380c5998826a4dffe335e7 05-Apr-2017 Felipe Leme <felipeal@google.com> Removed deprecated auto(F)ill classes.

Bug: 35956626
Test: manual verification
Test: CtsAutoFillServiceTestCases pass
Change-Id: Icb622589c41e6a286d51e3f85bd5a813e483b5ea
/frameworks/base/core/java/android/service/autofill/Dataset.java
f43ca7968fed9fe8862d9b7217c94687dbb12e0a 31-Mar-2017 Felipe Leme <felipeal@google.com> Initial implementation of autofill partitioning.

BUG: 35707731
Test: existing CtsAutoFillServiceTestCases pass
Test: PartitionedActivityTest

Change-Id: If9df5fe63249f0b9e9da058d1c9327dfd3c09cf3
/frameworks/base/core/java/android/service/autofill/Dataset.java
78696bfeb7ac5ae298765bfb9f82cf24d12b7dcc 31-Mar-2017 Felipe Leme <felipeal@google.com> Moar pre-partitioning refactoring.

On ViewState: split value into mCurrentValue and mAutofilledValue.
On Session: replacing mAutofilledDataset by mDatasetWaitingAuth and
ViewState.getAutofilledValue() (mAutofilledDataset is still needed,
but will be removed in the first partitioning CL).

Also fixed a missed 'return' on TimePicker.autofill()

Bug: 35707731
Test: CtsAutoFillServiceTestCases pass

Change-Id: Icc32701ae3e499a77d99e6ae1daa7d070a3df631
/frameworks/base/core/java/android/service/autofill/Dataset.java
24d5893b25ce62b7bc9ed9f35fa72b9d47f23cdd 21-Mar-2017 Felipe Leme <felipeal@google.com> Added a UserManager.DISALLOW_AUTOFILL restriction.

bug: 35710740

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testUserRestriction
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedProfileOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDisallowAutofill_allowed

Change-Id: I41b2bf9fe3bc8df627c6650960bd11346c430a7e
/frameworks/base/core/java/android/service/autofill/Dataset.java
5311206f3434d631c6ea81ab2e76a46ca18119b6 20-Mar-2017 Felipe Leme <felipeal@google.com> Add custom presentation (RemoteViews) on Dataset values.

New tests on LoginActivityTest:

- testAutofillOneDatasetCustomPresentation()
- testAutofillMultipleDatasetsCustomPresentations()
- testAutofillMultipleDatasetsCustomPresentationSameFields()
- testAutofillMultipleDatasetsCustomPresentationFirstDatasetMissingSecondField()
- testAutofillMultipleDatasetsCustomPresentationSecondDatasetMissingFirstField()

Fixes: 36067706
Test: CtsAutoFillServiceTestCases pass

Change-Id: Iacb660bf5a5cf311dea4bfcbfe1b3722aab34715
/frameworks/base/core/java/android/service/autofill/Dataset.java
82e3793c15298f9c62edee23259c116606f10911 10-Mar-2017 Felipe Leme <felipeal@google.com> Decouple Dataset ids from SaveInfo.

The FillResponse was automatically adding the AutofillId of all Datasets to
the SaveInfo object, but that would cause problems when the AutofillService
is not able to save some data (for example, if it comes from a read-only
backend).

Bug: 36076444
Test: OptionalSaveActivityTest pass
Test: m update-api
Change-Id: I1d5faaddf29e1be0f357438c8485e07caf975293
/frameworks/base/core/java/android/service/autofill/Dataset.java
640f30a7763b0a4b80c767acb84c740aac04768b 07-Mar-2017 Felipe Leme <felipeal@google.com> Replaced auto-fill by autofill to keep it consistent with API style.

This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
/frameworks/base/core/java/android/service/autofill/Dataset.java
eb49515abd2353f32e0eb7b3964847c6399986c9 22-Feb-2017 Svet Ganov <svetoslavganov@google.com> Move the presentation view to proper location.

Test: Auto-fill tests pass

bug:33550221

Change-Id: I041a084800e761859c67b962fb4aefafce8956d8
/frameworks/base/core/java/android/service/autofill/Dataset.java
00c771dc7d8242362f1491ae4ce3efd641235b36 19-Feb-2017 Svet Ganov <svetoslavganov@google.com> Add support for remote views backed auto-fill UI

Test: CTS and manual

Change-Id: Ia09f0208d78439491052e4886a0e71c387b73370
/frameworks/base/core/java/android/service/autofill/Dataset.java
d633f072552815301a559520a1f93eb7e79ba319 14-Feb-2017 Felipe Leme <felipeal@google.com> Minor improvements to help diagnose auth workflow.

BUG: 35348724
Test: CtsAutoFillServiceTestCases passes

Change-Id: I6ad3320faca8eed329b2cc4836281a547f57456a
/frameworks/base/core/java/android/service/autofill/Dataset.java
782043caf81055aa1c331e9cc15b24a10e1bf17a 11-Feb-2017 Svet Ganov <svetoslavganov@google.com> Refactor auto-fill

* Fix a layering issue where auto-fill manager which is in view
depended on activity which is in app

* Moved auto-fill classes to view or service based on their
purpose and removed dependecy on the classes in view to the
classes in service

* Push state to local auto-fill manager whether auto-fill is
enabled to avoid making IPC for every focus transition if
the user did not enable the feature

* Remove unnecessary offload to messages when handling calls
to auto-fill manager service as these are made over a oneway
interface and in general they do almost no work and typically
we do these on the binder thread

* Removed id from data set and fill response as the provider
can embed everything it needs to id them in the auth pending
intent

* Enforce the auth UI to be only an activity as this will work
with multi-window, recents, and back and also does not require
draw on top of other app special permission

* Authentication also no longer requires passing a remotable
callback to the auth activity but the activity handles the
request as if called for a result

* Handling stopping of a user to clean up in-memory state as
well as handling when a user gets unlocked as a provider may
be non-direct boot aware

* User the correct context when creating an auto-fill manager

* Move the receiver that listens for requests to hide system
windows to the manager service as the UI is a singleton and
no need every per-user state to register its own

* Removed extras from dataset as the only case a provider needs
to associate state with a dataset is for auth and the provider
can embed this data in the auth pending intent

Test: manual and CTS

Change-Id: I4bc54c13cf779d7f6fdb3ab894637f9fac73f603
/frameworks/base/core/java/android/service/autofill/Dataset.java