• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/service/autofill/
History log of /frameworks/base/core/java/android/service/autofill/
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
utofillService.java
ataset.java
illContext.java
illRequest.java
illResponse.java
aveInfo.java
4f7fd183ebaec60256d38fa4633a09f1a4afc5a5 21-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev

* changes:
Don't add FillEventHistory events to the wrong session.
Fixed how FillEventHistory is reset and clarified javadoc.
d013bcea9713d178627cc1d3e8a0f291ccbcd293 21-Jun-2017 Felipe Leme <felipeal@google.com> Don't add FillEventHistory events to the wrong session.

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
illEventHistory.java
2e30c6f371be6211f1fa2b2257084df24a535795 20-Jun-2017 Felipe Leme <felipeal@google.com> Fixed how FillEventHistory is reset and clarified javadoc.

Test: existing CtsAutoFillServiceTestCases pass
Test: checkFillSelectionIsResetAfterReturningNull()
Test: checkFillSelectionIsResetAfterReturningError()
Test: checkFillSelectionIsResetAfterTimeout()

Bug: 62802026

Change-Id: I389d95fc13c08f1056960e5f67e131c8dc306401
utofillService.java
illEventHistory.java
bce4b7f1273f1d7108ed6b649320b98b73023b15 20-Jun-2017 Felipe Leme <felipeal@google.com> Removed deprecated, hidden method.

Test: existing CtsAutoFillServiceTestCases pass
Bug: 37563972

Change-Id: I10c5a2b16b422694d72b3ccaf6629d50247c7f49
utofillService.java
266752317b7752394e39618f6fe1ad2829e919d8 19-Jun-2017 Felipe Leme <felipeal@google.com> Fixed updateAutofillValue() when mText is not set.

updateAutofillValue() was crashing some apps when the mText was not set at the
time it was called. One solution would be to not set mText at all - since the
Autofill Service should rely only on getAutofillValue() - but that could break
existing services.

Hence, a safer solution is to set that field if it's null.

Test: existing CtsAutoFillServiceTestCases tests pass
Test: manual verification using Fly Delta app

Fixes: 62751039

Change-Id: I91a8e0ed5db4148f5eb5729b8e254aa3531f15e4
utofillService.java
a89414962d0ea123b5e87be245bbcaf08de647f3 16-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use an optimized findViewNodeByAutofillId(id) to get just one node." into oc-dev
94b56207a45f0112339833b3d76662e583a51e73 16-Jun-2017 Felipe Leme <felipeal@google.com> Use an optimized findViewNodeByAutofillId(id) to get just one node.

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
illContext.java
18d0ef70b09ee17523056849483e4a182faddf98 16-Jun-2017 Felipe Leme <felipeal@google.com> Throw IAE when service add null AutofillIds on SaveInfo methods.

Test: existing CtsAutoFillServiceTestCases pass
Test: manual verification using Contacts app
Test: manual verification adding a CTS test case that crashes the app, but such
test cannot be commit because once the issue is fixed, it crashes the
service (the right way to test this fix is through unit tests against
exceptional conditions, but we don't support those on Autofill yet).

Fixes: 62649290

Change-Id: I8fc01fa929270219cd40035ff02eaf0dda5ecbfa
aveInfo.java
d52611258ed141888d54a8a43acb88f0a412ebb7 10-Jun-2017 Felipe Leme <felipeal@google.com> Removed deprecated setExtras() method.

Bug: 37563972
Test: CtsAutoFillServiceTestCases pass

Change-Id: I7fef7c81267dad9097c711dbba849adf9d6b1cc5
illResponse.java
e8f68080795374c4c3ee25a068990d602e63320f 06-Jun-2017 Felipe Leme <felipeal@google.com> Use initial value on save when value didn't change.

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
illContext.java
73fedacfebcccd54f2c36ff7c8eb9929e8ce8455 12-May-2017 Felipe Leme <felipeal@google.com> Removed deprecated APIs.

Test: CtsAutoFillServiceTestCases pass
Test: manual verification with existing service

Bug: 37563972

Change-Id: Ibea2810f9230f06e59d2d81e4ba853de54987956
utofillService.java
aveInfo.java
22567d3415c88b2d054a1540dd868e60d274aac8 09-May-2017 Philip P. Moltmann <moltmann@google.com> Speed up structure update before OnFillRequest

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
illContext.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
ataset.java
illResponse.java
1c38d29482f1c733a595fcfbeeafecda775f30ad 08-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed scenario where an authentication response has no dataset." into oc-dev
ecfa58a1133a3bf2ab7909662771ae7be72ef285 06-May-2017 Svet Ganov <svetoslavganov@google.com> Add call super

Test: manual

bug:37775067

Change-Id: I50a50f1fbdb7e9c087c72ad0be3b767aeab9572a
utofillService.java
8fd057532783fda6f5187431ed2afac72d3bb0e8 05-May-2017 Felipe Leme <felipeal@google.com> Fixed scenario where an authentication response has no dataset.

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
aveInfo.java
136a48e36ab47feb35263f281a4e67bc850116ea 02-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removed deprecated setAuthentication() method that didn't take ids." into oc-dev
c2430f3c4d6e3b996917f57c8afb0b00b5bef45b 01-May-2017 Felipe Leme <felipeal@google.com> Removed deprecated setAuthentication() method that didn't take ids.

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
illResponse.java
000ce805050f0bdbf485464b84eb2c08bca5ad72 29-Apr-2017 Jeff Sharkey <jsharkey@android.com> Updates based on API council guidance.

Test: builds, boots
Change-Id: I223faf55c1e1b4d81d11b4c8b2d93ccd131c969b
Fixes: 37775662
Fixes: 37748635
Fixes: 37673408
Fixes: 37672564
Fixes: 37672218
Fixes: 37638323
Fixes: 37637423
utofillService.java
illRequest.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
ataset.java
illContext.java
illResponse.java
aveInfo.java
0aa4c5065d1495ec0b2c6fe15324569f31dcbdb1 26-Apr-2017 Felipe Leme <felipeal@google.com> Refactored Autofill to move starting flag out of Session.

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
illContext.java
decd887f012f0c39bba855c8878eb5d8255595c4 27-Apr-2017 Felipe Leme <felipeal@google.com> Autofill binding permission fixes.

- 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
utofillService.java
utofillServiceInfo.java
dc6cccb905d77b1fd954c883e4369e7b401cb457 25-Apr-2017 Svetoslav Ganov <svetoslavganov@google.com> Get rid of custom negaitve save button label

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
utofillService.java
aveInfo.java
121e526476fb226cabf400c55a0bbfdd0781e772 25-Apr-2017 Philip P. Moltmann <moltmann@google.com> Return all previous FillContexts onFill

Test: CtsAutoFillServiceTestCases
Fixes: 37673341
Change-Id: I80feb5bd8d6027fb4ec2dd32f5c486dae7c6bc4c
utofillService.java
illRequest.java
c7619632145c23e6b5dd45620094e0bc686ad2db 25-Apr-2017 Philip P. Moltmann <moltmann@google.com> Report multiple FillContext-s onSave

To make life easier the reponseId is not part of the FillResponse.

Test: CtsAutofillServiceTestCases (added test for multiple Contexts)
Change-Id: If09e00b7267d293e4234a7a9837ad88d73af1b24
Fixes: 36481649
illCallback.java
illContext.java
illRequest.java
illResponse.java
FillCallback.aidl
6a77849cca4b4017c337d204c0c8171fc121ca34 25-Apr-2017 Felipe Leme <felipeal@google.com> Make new onFill/onSave methods abstract.

Test: CtsAutoFillServiceTestCases pass
Test: manual verification

Bug: 37563972

Change-Id: I1447bcc3ac03b3cbf71362f370abedb9f00152b9
utofillService.java
f40d1cb773064bf8cac7e5760163897e9b1ece40 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Take new autofill structure for each partition" into oc-dev
59fe3108fa958b7a84cea6ddf863e7a4b683716c 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hide deprecated APIs." into oc-dev
2f517c26d23393d4f0d6b3352de6e4c92c9e107e 22-Apr-2017 Philip P. Moltmann <moltmann@google.com> Take new autofill structure for each partition

Bug: 36481649
Test: CtsAutofillServiceTestCases (now with a test that has an autofill
session over two full screen fragments)
Change-Id: I55f2f6203f3bd5a7082b4ce90500d2c16a260c7d
utofillService.java
illRequest.java
85d1c2d2905362b984563d9b5e8332010c272fc5 21-Apr-2017 Felipe Leme <felipeal@google.com> Minor fixes on Autofill Framework:

- 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
utofillService.java
illResponse.java
cb4dd8090b0e68aa185ba1a8a13686c38311d0db 22-Apr-2017 Felipe Leme <felipeal@google.com> Hide deprecated APIs.

Test: CtsAutoFillServiceTestCases pass
Bug: 37563972

Change-Id: Ia5f33c5624b7a6be3c152e126c99800914d23cbd
utofillService.java
illResponse.java
0d3db06d1d287c3efe18c951e08f4e7c6b3ebd47 21-Apr-2017 Felipe Leme <felipeal@google.com> Removed deprecated SaveInfo methods.

Test: CtsAutoFillServiceTestCases pass
Bug: 37563972
Bug: 33197203

Change-Id: Ie90fa78c31f033c47e7b2f018355ae87759c622b
aveInfo.java
01ded104a139d9f68b0fa05c548c9261e61c75c1 21-Apr-2017 Felipe Leme <felipeal@google.com> Implemented FillResponse.setIgnoredIds().

Fixes: 37424141

Test: existing CtsAutoFillServiceTestCases pass
Test: PartitionedActivityTest.testIgnoredFieldsDontTriggerAutofill

Change-Id: I09bd95230c45d2970080514e25cb53320de49b56
illResponse.java
fe1bddfbb54c20156b45e99c9d18166d702c9adb 19-Apr-2017 Felipe Leme <felipeal@google.com> Merge "Some Autofill API changes." into oc-dev
e5f9c30688f0277505fb6b50ea385e5df6271ed8 19-Apr-2017 Felipe Leme <felipeal@google.com> Some Autofill API changes.

- Added View.IMPORTANT_FOR_AUTOFILL_YES_INCLUDE_DESCENDANTS
- Added View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
- Added FillResponse.Builder.setIgnoredIds()
- Fixed javadoc links.

These changes are not implemented yet....

Bug: 37424141
Bug: 36171235
Test: m update-api

Change-Id: I604960443ab08cd3f2a84a70b0a2cece7cb0a00c
utofillService.java
illCallback.java
illResponse.java
aveCallback.java
aveInfo.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
utofillService.java
ataset.java
illEventHistory.aidl
illEventHistory.java
9023d14fb30c23ef58171a5133f893b2ee4e743c 18-Apr-2017 Philip P. Moltmann <moltmann@google.com> Change saveOnAllViewsInsible from boolean to flags

Change-Id: Ibd6f283479bad841eb7b20bb8d006562c4398e9f
Fixes: 35708237
Test: CtsAutoFillServiceTestCases
aveInfo.java
494c3f5da2c467ad07f50b4e1ad01065a8e3aa4f 11-Apr-2017 Philip P. Moltmann <moltmann@google.com> Allow to finish session when all views are gone

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
aveInfo.java
013efe173e56612a910ebd8576480ce4ef005e3c 14-Apr-2017 Svet Ganov <svetoslavganov@google.com> Add support for multiple fill contexts

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
utofillService.java
illCallback.java
illContext.java
illRequest.aidl
illRequest.java
illResponse.java
AutoFillService.aidl
FillCallback.aidl
aveInfo.java
aveRequest.aidl
aveRequest.java
43574b03e5604e346f088a1b0da2ab37fb115226 12-Apr-2017 Svet Ganov <svetoslavganov@google.com> Add autofill feature API

We now have a software feature for autofill which can be used
by partners to disable it on low-end devices or form factors
for which autofill doesn't make sense.

bug:35956220

Test: manual (requires a custom build)

Change-Id: I6c06462ed9ca3ae93331700dce38a8c08dfd0722
illResponse.java
fc4a3004e37b25065412fa65cbe060c08bf0398a 11-Apr-2017 Svet Ganov <svetoslavganov@google.com> Keep a removed API to not break GCore presubmit

Change-Id: Ica38b7aad2a5a8792917d0da1d497f373b118077
utofillService.java
f20a037ba2a6990bb51ad40ee18c7af18464f620 11-Apr-2017 Svet Ganov <svetoslavganov@google.com> Move API for disabling an autofill service to the manager

Test: the topic has a CTS test

bug:37170723

Change-Id: I2be18968ea8df0fd3fb070fe2efc3e811b0e5a76
utofillService.java
AutoFillService.aidl
AutoFillServiceConnection.aidl
eab62baabf290ea6671577a66cfc9fdd1b145d0e 20-Mar-2017 Philip P. Moltmann <moltmann@google.com> Restore session on new window after app kill

Also:
- Give the session an integer ID as the activityToken is not stable over
restarts of the activity
- Verify that session is only accessed by one UID
- stabilize AccessibilityViewIds over activity lifecycle at least for
the IDs we can do that. This required to split the ID namespace in
"per-app" and "per-activity" views. Only the later ones can be
restored.
- Do not end session when app is killed (as it can be restarted)

Bug: 35484143
Fixes: 36392498
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases --test=android.autofillservice.cts.SessionLifecycleTest
cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
Change-Id: I229acc1b3ce35fb57262da7d7466b5d4328b49d4
utofillService.java
7d5adb5b86a83759c52a3b7aa7bc58beb8ce1c43 07-Apr-2017 Felipe Leme <felipeal@google.com> Autofill Partitioning: support multiple SaveInfos.

Bug: 35707731
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: I2f234ca13c7e74f84c762473e38f938ed47f216f
aveInfo.java
7a7c0ace8277d06513ab9eaa19159d66919764ba 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removed deprecated onFillRequest() method" into oc-dev
52d5d3dfc7d4d4b6dfed1686cc904c08d7433a04 04-Apr-2017 Felipe Leme <felipeal@google.com> Pass FillResponse bundle on subsequent onFillRequest() calls.

BUG: 35707731

Test: existing CtsAutoFillServiceTestCases pass
Test: more tests on PartitionedActivityTest

Change-Id: I510aff54d0d9d7e0cce90f9786e3e1f6cab180f9
utofillService.java
illResponse.java
aaca304a31ed260e4cca256a28805f71aa2e4ee9 06-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Created SaveInfo types for email and username." into oc-dev
a9baa4c8511baa038d2ed6f59bd08d3bd610a5ed 06-Apr-2017 Felipe Leme <felipeal@google.com> Merge "Changed FillResponse.setAuthentication() to require field ids." into oc-dev
b3c3537566b5993a2abc01b63da9dbe6fd32e57a 03-Apr-2017 Felipe Leme <felipeal@google.com> Changed FillResponse.setAuthentication() to require field ids.

Currently, authenticate FillResponses do not support partition and follows
the "Highlander approach" (There can be just only one), which causes the
authentication UI to show on all views.

This CL overloads FillResponse.setAuthentication() so it requires the
AutofillIds of the autofillable fields, although behind the scenes it
calls the old method - once clients use the new method, the old method
will be removed and the underlying implementation changed.

The new behavior will be tested by testFillResponseAuthJustOneField()
on LoginActivityTest, although currently it's testing the old behavior.

Test: LoginActivityTest.testFillResponseAuthJustOneField

Bug: 35707731
Bug: 36855717

Change-Id: I601f3e4776aa8763415a06d8d802901a930728d2
illResponse.java
a86aee6ef3274d15c061a2df344408cd8cf2831d 05-Apr-2017 Felipe Leme <felipeal@google.com> Removed deprecated onFillRequest() method

Bug: 35708229
Test: manual verification
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ie6d146386752273b6a35d16102ccedaf6a161676
utofillService.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
utoFillService.java
utofillService.java
utofillServiceInfo.java
ataset.java
aveInfo.java
0962262f42e3636270689100e1bb90b8f3cf6d77 04-Apr-2017 Felipe Leme <felipeal@google.com> Created SaveInfo types for email and username.

Bug: 35707731
Test: LoginActivityTest#testCustomizedSaveUsername
Test: LoginActivityTest#testCustomizedSaveEmailAddress
Change-Id: I3598c64e4f6bb9ceff544c3994d6cdeebd760a85
aveInfo.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
ataset.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
ataset.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
utofillService.java
ataset.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
ataset.java
fe4e6a219a072e844f65b7722531307a039a2d63 16-Mar-2017 Felipe Leme <felipeal@google.com> Temporarily removed check for null requiredIds on SaveInfo builder.

Bug: 36076444
Test: manual verification
Change-Id: I8fc5ef537d229d9eda78d458a71d85ac69440c94
aveInfo.java
2ac463e3f5c3b757ecbc7e30e0fc1e8e0d878272 13-Mar-2017 Felipe Leme <felipeal@google.com> Allow users to manually request Autofill.

- Added a requestAutofill(view,flags) method, that when passed with
FLAG_MANUAL_AUTOFILL triggers a manual request.
- Added same method for virtual views
- Overloaded existing AutofillService request methods to take a flag.
- Added an AUTOFILL context menu option on TextViews.
- Added a canRequestAutofill() that is used to enable the context menu.

BUG: 35708229
Test: manual verification
Test: existing CtsAutoFillServiceTestCases pass
Test: android.autofillservice.cts.LoginActivityTest#testManualAutofill pass

Change-Id: I1a64d40da3373774451d178b1cabf20f11120e9d
utofillService.java
illCallback.java
illResponse.java
AutoFillService.aidl
aveInfo.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
ataset.java
illResponse.java
aveInfo.java
104b932b7b84e4d4dda51b187615d79e2559ebca 14-Mar-2017 Felipe Leme <felipeal@google.com> Fixed obsolete TODOs.

Test: not needed
Bug: 35395043
Bug: 26742218

Change-Id: I0e5adb574610374055a6546b66529a7aed7cc413
utofillServiceInfo.java
43818a73eb535ba462ef7a56ffc3ab37e77c2ea0 11-Mar-2017 Felipe Leme <felipeal@google.com> Temporarily re-added addSavableIds() with AutoFillId.

Bug: 35727295
Test: manual verification using client using old API
Change-Id: I5589c5e38c11fc4d2a04df6c540a8cded6475ac4
aveInfo.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
utoFillService.java
utoFillServiceInfo.java
utofillService.java
utofillServiceInfo.java
ataset.java
illCallback.java
illResponse.java
aveCallback.java
aveInfo.java
6ee1ed48b583971915759ce8f6e506168f4dfa78 08-Mar-2017 Felipe Leme <felipeal@google.com> Removed deprecated setSavableids().

Bug: 35727295
Test: LoginActivityTest#testAutoFillOneDatasetAndSave passes

Change-Id: I33a33bf438fe258685025118a3dfa8a59bd456da
illResponse.java
5048c1cbb1aee30ba06f9bfd851fa89d26677f63 03-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fill-provider can control the negative button label and listener"
33d06fcac5abdded783d1b59f5b299ca5d27d5c7 01-Mar-2017 Svet Ganov <svetoslavganov@google.com> Fill-provider can control the negative button label and listener

Test: New CTS tests added and all autp-fill tests pass

bug:35869744

Change-Id: I55e5938038e612d728498658a763208f7022f85a
illResponse.java
aveInfo.java
7ad11281378a1248c08c703b14cfc681e37cac1b 28-Feb-2017 Svet Ganov <svetoslavganov@google.com> Allow auto-fill services to disable themselves

1. Added a new API for a connected auto-fill service to
disable itself

2. Added a new shell command to destroy all pending sessions
which is used in CTS tests

3. Fixed a bug where the unbind timeout was in minutes
instead of seconds

Test: wrote CTS tests, all auto-fill tests pass

bug:35848030

Change-Id: I681605aa0b8c004a0f14e30b57117c291d89a894
utoFillService.java
AutoFillService.aidl
AutoFillServiceConnection.aidl
b72f012cb49a5930010fb0766776b40c2955ee3e 24-Feb-2017 Felipe Leme <felipeal@google.com> Added customization to SaveInfo.

Bug: 35727295
Test: CtsAutoFillServiceTestCases pass
Test: m update-api

Change-Id: I7eba36b6ab8181ae1cdbd10b0879927b9f9cf086
illResponse.java
aveInfo.java
f69761ffbe3098067ae720263ef05262f4b5d41e 24-Feb-2017 Felipe Leme <felipeal@google.com> Refactored savableIds() into a SaveInfo class.

For now it's a "1-to-1" refactoring that keeps the same
functionalities, but soon SaveInfo will be expanded to
allow the AutoFillService to customize it.

Bug: 35727295
Test: CtsAutoFillServiceTestCases pass
Test: m update-api

Change-Id: I5aaa705be2b32590048f70ed0142437e05df94b7
illResponse.java
aveInfo.aidl
aveInfo.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
ataset.java
illResponse.java
fe35e69d964dbd09cc8e6390e41ca9347baea108 21-Feb-2017 Felipe Leme <felipeal@google.com> Use ArrayList instead of ArraySet for FillResponse.getDatasets()...

...otherwise it might not preserve the order.

Test: manual verification
BUG: 35348724

Change-Id: Ib19d364253ea4f0cbbeca8a73b08800482e74820
illResponse.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
ataset.java
illResponse.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
ataset.java
illResponse.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
utoFillService.java
ataset.aidl
ataset.java
illCallback.java
illResponse.aidl
illResponse.java
AuthenticationCallback.aidl
AutoFillAppCallback.aidl
AutoFillManagerService.aidl
FillCallback.aidl
aveCallback.java
ef0c1885cb9aa62dc2d2eee2849d103b32271133 10-Feb-2017 Svet Ganov <svetoslavganov@google.com> Move auto-fill shell command off IPC

Auto-fill has a shell command that is useful for development
which is currently exposed as a remote method allowing any app
to call it reflectively. Since only case this method is called
is when handling a shell command there is no need to expose it
to IPC over binder.

Test: manual

Change-Id: Iac20b4a39c7065e254f8aa277d1f2fd1c38b24a8
AutoFillManagerService.aidl
4997c505c9b6379961ede3b6eef75e3b60f283ac 08-Feb-2017 Felipe Leme <felipeal@google.com> Guarded access to mCallback and check for null before using it.

Fixes: 35143142

Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I465538b896b617c518949611f963e350ee498f7b
utoFillService.java
bab851c7c9dfe6f3d063a1009c4d57cfa2ff005c 04-Feb-2017 Felipe Leme <felipeal@google.com> Refined session management so Save can be automatically called.

This is yet another big refactoring:

- AutoFillManager keeps track of its current AutoFillSession.
- Views call AFM.startSession(View) when they can trigger autofill.
(virtual views can call it as well). At this point, the manager
sets an AutoFillSession, gets the activity token, and passes it to
the service.
- Subsequent calls to AFM.start() will be ignored since the session
is set.
- When the Activity is gone, it calls AFM.finishSession().
- Simlilarly, virtual views could call it as well.
- Added getAutoFillValue() to View.
- Removed AFM.updateAutoFillInput(childId): virtual views should now
call startSession(childId) to start a session, and use the
VirtualViewListener callbacks for updates.
- Change AutoFillValue to use String (which is immutable) instead of
CharSequence for text values.
- Check if view is enabled before auto-filling.
- Removed 'cmd autofill fill' since it would require the appCallback
- Automatically dismiss the snack bar after 30s
- Moved the "don't change autofill value when autofilling" Inception
logic into the service side.
- Etc...

BUG: 34819567
BUG: 33269702
BUG: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: I5fad928d4d666701302049d142026a1efa7291cd
utoFillService.java
AutoFillAppCallback.aidl
AutoFillManagerService.aidl
0f4928f1f73407485d6d94beda1dba1a2360ebbf 03-Feb-2017 Svet Ganov <svetoslavganov@google.com> Refactoring of auto fill - lifecycle, auth, improvements

1. Move management of the remote fill service in a dedicated
class that abstracts away the async and ephemeral nature
of the binding.

2. Update auth to move fingerprint out of the platform and
allow response and dataset auth.

3. Cleaned up the fill and save callback classes.

4. The UI is now shared among all sessions and cleaned up.

5. Reshuffled the remote callbacks to have cleaner separation.

6. Cleaned up and tightened the reponse and dataset classes.

7. Added API to support communicationn with intent based auth.

Test: CTS + manually

bug:31001899

Change-Id: Idc924a01d1aea82807e0397ff7293d2b8470d4d6
utoFillService.java
utoFillServiceInfo.java
allbackHelper.java
illCallback.java
AutoFillAppCallback.aidl
AutoFillServerCallback.aidl
AutoFillService.aidl
FillCallback.aidl
SaveCallback.aidl
aveCallback.java
0200d9ea1509089c0c03b7071aa271e3a9b35c11 25-Jan-2017 Felipe Leme <felipeal@google.com> 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
utoFillService.java
AutoFillManagerService.aidl
AutoFillServerCallback.aidl
AutoFillService.aidl
aveCallback.java
bd00fef41ce38d2c711bd4151997c1cd8964b712 25-Jan-2017 Felipe Leme <felipeal@google.com> Moar AutoFill Framework refactoring...

* Encapsulated application-level auto-fill logic on AutoFillSession.
Currently, Activity.java directly manages the IAutoFillCallback binder
object used to auto-fill its views, but this logic need to be
extended so Views can use it to draw the auto-fill bar.

* Pass auto-fill id and boundaries to requests
So AutoFillUI can display its affordance in the right places.

* Uses a new auto-fill id on View (instead of reusing accessibility's).
That allows moving the logic on whether a new request should be made or
the existing UI moved to the service side.

* Split service methods in 2, for shell cmd and app
And applied the right permission check on both.

* Removed CancelationSignal from onSaveRequest()
Since it's not really needed.

* Etc...
¯\_(ツ)_/¯

BUG: 34637800
BUG: 31001899
Test: CtsAutoFillServiceTestCases passes
Test: manual verification

Change-Id: Ibd0cb2cfff6d0f6bb6b697a423ed5e89df687b82
utoFillService.java
AutoFillAppCallback.aidl
AutoFillManagerService.aidl
AutoFillServerCallback.aidl
AutoFillService.aidl
aveCallback.java
436ab6a91d64ef6036c67bb361d807e398fb2c4c 15-Dec-2016 Felipe Leme <felipeal@google.com> Added support to authentication.

AutoFillService can now require user authentication, both at
FillResponse and Dataset levels;
- FillResponse authentication is typically used when the user data
need to be unlocked before the first use.
- Dataset authentication is typically used to unlock sensitive data
such as credit card info.

The authentication can be handled by the service itself (for example,
when it uses the credit card CVV to unlock it) or by the Android
system (when the service asks for fingerprint authentication).

Bug: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: If62f42f697ab5ef0d14d991ff1077d1c38808e61
utoFillService.java
allbackHelper.java
illCallback.java
AutoFillAppCallback.aidl
AutoFillServerCallback.aidl
AutoFillService.aidl
aveCallback.java
000f7cd646f016febb4d90ae19a697ae548025e2 25-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Initial IME integration."
3461d3c069468e176fab6bc8b8e78c8e6bc81e8b 19-Jan-2017 Felipe Leme <felipeal@google.com> Initial IME integration.

- Created an AutoFillManager class, which provides methods to show
the auto-fill bar for views and virtual nodes.
- Automatically launches an auto-fill request when the IME is shown
(and an AutoFillService is set for the given user) on TextViews.
- Updated VirtualNodeListener to use this new API.

BUG: 31001899
BUG: 34171325
Test: CtsAutoFillServiceTestCases passes
Test: manual verification

Change-Id: Id72ce97da70217081b5823cfc7b138412634fcf3
utoFillService.java
illCallback.java
AutoFillManagerService.aidl
aveCallback.java
c121dda89a0df1c174d63fa9c50f8924365fefe4 22-Jan-2017 Jason Long <jasonlong@google.com> Define contract for AutoFillServiceInfo more precisely.

Change-Id: I295dec0c7318eecdceb962df9c0d888d12e9b654
Bug: 31001899
Test: Manual
utoFillServiceInfo.java
4b93f46130ab9a972773ebf2be9839109d5c6a08 18-Jan-2017 Jason Long <jasonlong@google.com> Add <autofill-service> that declares AutoFillService metadata.

The initial version of <autofill-service> may contain a settingsActivity
attribute.

Test: Manual verification
Change-Id: I63a67aa4b7110fbf21d0b01ee53add712bfb0364
utoFillService.java
utoFillServiceInfo.java
6d553874bed06280766ae24ea605f9bbde3f5a4a 09-Dec-2016 Felipe Leme <felipeal@google.com> YAMAFFR - Yet Another Major AutoFill Framework Refactoring

- Explicitly split View methods into Assist and AutoFill methods, rather
than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
ASSIST_FLAG_NON_SANITIZED_TEXT flags to
AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
IAutoFillServerCallback, residing at the app and system_server
respectively), so service cannot fill the app directly (which lets
the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
system_server can act as a mediator between the AutoFillService
implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
- FillResponse contains a group of Datasets, each representing
different values
that can be used to auto-fill an activity (for example, different
user accounts), optional id of fields the service is interested
to save, and an optional bundle for service-side extras.
- Dataset contains a name, Fields, and an optional bundle for
service-side extras.
- Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
- Initial notification requests the auto-fill data but do not
auto-fill.
- Once service calls back, a new notification is shown with the
results.
- Then if the user selects a dataset, the activity is auto-filled
with it.
- It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
- autoFill(Bundle) to auto-fill the view.
- getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
- Text fields (like EditText)
- Toggle fields (like CheckBox)
- Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
now only text fields have it, and it's the same as getInputType()).
- etc :-)

Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
utoFillService.java
illCallback.java
illableInputField.java
AutoFillAppCallback.aidl
AutoFillCallback.aidl
AutoFillManagerService.aidl
AutoFillServerCallback.aidl
AutoFillService.aidl
aveCallback.java
1ca634a544a47193dd9e57f9b3eb3e42ab0dbbf1 29-Nov-2016 Felipe Leme <felipeal@google.com> AutoFill Framework refactoring.

The AutoFill Framework uses the same AssitStructure provided by the Assist API
and so far it was using the same methods as well, both internally and externally
(public API).

Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic).

This CL also splits the original 'auto-fill' request in 2 types of requests,
which are set by View flags:

- ASSIST_FLAG_SANITIZED_TEXT
- ASSIST_FLAG_NON_SANITIZED_TEXT

It also added new methods and callbacks to handle save requests.

Bug: 31001899
Test: manual verification

Change-Id: I4eb09099dc19a43cb7e053e64d939aed3704b410
utoFillService.java
illCallback.java
AutoFillManagerService.aidl
aveCallback.java
254c2c99dd5a475180070031dbb251f9c7388c10 21-Nov-2016 Felipe Leme <felipeal@google.com> Added 'oneway' flags on AIDL where appliable.

Not only if fixes warning about outgoing transactions from system_server
not having the FLAG, but it fixes system crashes when the service
doesn't behave well (for example, if it does not call super.onCreate()
on onCreate().

BUG: 31001899
Test: manually built and ran it

Change-Id: I829ee501edb84bd02a60e8df92f9a0e0d2157887
utoFillService.java
AutoFillCallback.aidl
AutoFillManagerService.aidl
AutoFillService.aidl
dfa7fbc8702fae62e6b3f78c4d9245995baee04e 11-Nov-2016 Felipe Leme <felipeal@google.com> Bind AutoFillService on demand.

BUG: 31001899
Test: manually built and ran it

Change-Id: Ied7028e41c273f5e30f88fc92f919249046877eb
utoFillService.java
illCallback.java
AutoFillManagerService.aidl
AutoFillService.aidl
29a5b0d0f1cc7fd6cbfe97c816b8a687d9e438cc 25-Oct-2016 Felipe Leme <felipeal@google.com> Added a callback for AutoFillService.

So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
remote object - that will be used to set the auto-fill fields - and
returns it in the assist bundle (using the
VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
utoFillService.java
illCallback.java
illableInputField.java
AutoFillCallback.aidl
AutoFillManagerService.aidl
AutoFillService.aidl
5381aa4b585f3fa2a315d88e910111173e2ef77d 13-Oct-2016 Felipe Leme <felipeal@google.com> Initial implementation of the Auto-Fill Framework classes.

This CL provides the initial, skeleton implementation of the Auto-Fill
Framework classes:

- Defines the system service and app-based
AIDL (IAutoFillManagerService.aidl and IAutoFillService.aidl respectively).
- Defines the 'adb shell cmd' interface.
- Defines the permission required to access the service.
- Registers the service on SystemServer.
- Adds the code to bind the app-specified service to system_server.
- Defines the service class (AutoFillService) required by providers.
- Implements the initial startSession() method.

This is still a very early, "work-in-progress" change:
- It has many TODOs.
- It does not have unit or CTS tests yet.
- It does not provide a callback method to auto-fill the fields.
- In fact, it has a lot of TODOs.

Despite these adversities, it can be tested by following the steps
below:

1.Create an app with a service extending AutoFillService

2.Implement the onNewSession() method

3.In the manifest:
- Listen to android.service.autofill.AutoFillService intents.
- Require the android.permission.BIND_AUTO_FILL permission.

4.Explicitly set the app as an autofill-service by running:
adb shell settings put secure auto_fill_service MY_APP/.MY_SERVICE

5.Start a session against the top activity:
adb shell cmd autofill start session

BUG: 31001899
Test: manually built and ran it

Change-Id: I00f4822159b31ddddba8f513e57c4474bc74eb89
utoFillService.java
utoFillServiceInfo.java
AutoFillManagerService.aidl
AutoFillService.aidl