History log of /frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2f0d1324715ca1fdd6c4ab6c0f7f1c3c9c489503 22-Jun-2017 Felipe Leme <felipeal@google.com> Autofill fixes for secondary users:

- 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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
5f97880714e0ee2c503bca0d7681e896c53386b0 08-Jun-2017 Felipe Leme <felipeal@google.com> Closes Autofill UIs when back button is pressed.

Test: existing CtsAutoFillServiceTestCases pass
Test: LoginActivityTest#testSaveGoesAwayWhenTappingBackButton pass

Fixes: 62272098

Change-Id: Id34767ca32836f040e04790f0f2935ae49d88d71
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
350b2dca6c252dad099bc8e2d96cbffd6e98dfef 26-May-2017 Felipe Leme <felipeal@google.com> Disable autofill while user setup is not completed.

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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
7f33cd350be4278ce5d4ef460c11e4dbaf9c473b 11-May-2017 Felipe Leme <felipeal@google.com> Start a new session on manual request after session is "gone".

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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
7a1deb7c5f2c57df4f905ba997863a03d363a53e 12-May-2017 Felipe Leme <felipeal@google.com> Couple autofill fixes.

- 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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
6dc0177fe4212bc59e54260fdcbf779e0ee883c7 10-May-2017 Felipe Leme <felipeal@google.com> Decrease default number of partitions from 64 to 10.

...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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
298f89a3e3de719e522f89c7aea7502795f94ff6 09-May-2017 Felipe Leme <felipeal@google.com> Fixed autofill dumpsys and improved logging.

Fixes: 38196286
Bug: 37997043

Test: adb shell dumpsys autofill -a
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ifaae7b5c0894ecf0d16fff8a3c96e4746fe2361b
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
134cee27b8a54ff4c8bebda51c5fe4a4e6f1fd8a 06-May-2017 Philip P. Moltmann <moltmann@google.com> No need to deal with windowTokens

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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
33948042ffdf2311605f73fea915baf40f0c3462 08-May-2017 Philip P. Moltmann <moltmann@google.com> Check callbacks when operting on UI

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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
f37ba7496feeadcfc7268a5363a533fd06ba838a 07-May-2017 Svet Ganov <svetoslavganov@google.com> Only clear state for force stopped fill service

Test: manual

bug:37785814

Change-Id: I5e40a284788bacf1ebae5ddefffb93b1a5b47d39
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
1f8b07bb8d644c88869f1356443f07c2902e2e3e 04-May-2017 Felipe Leme <felipeal@google.com> Improved dump() on Autofill UI.

Bug: 37958210
Bug: 37986800
Test: adb shell dumpsys autofill --ui-only

Change-Id: Ia580eba219c919f7e84cdd39b756d60cd687f275
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
b4ff3bbdb1957b5ebe0f0c6ff8a8a942145cabf8 28-Apr-2017 Philip P. Moltmann <moltmann@google.com> Apply proper theme to SaveUi

Bug: 37754078
Test: Started SaveUI on angler and marlin. angler was green, marlin was
blue
Change-Id: I1b2f07269d3df3949344672f23329ea735c22a94
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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/services/autofill/java/com/android/server/autofill/AutofillManagerService.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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
8abf3cbe1aaffbd81748f5989cac00fe7100087c 27-Apr-2017 Philip P. Moltmann <moltmann@google.com> Fix LoginActivityTest#testIsServiceEnabled

Test: CtsAutoFillServiceTestCases
Change-Id: I584fb1bf72cbb233a4b3280f3bce47d02dee933c
Fixes: 37728979
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
48f10a2ab53e415f34d86ac717b4f6412dfc824f 27-Apr-2017 Svet Ganov <svetoslavganov@google.com> Handle package changes in autofill manager service

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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
bb81092a31649b4e1031e24d68958180f5d4024e 26-Apr-2017 Felipe Leme <felipeal@google.com> Provide support for optimized ACTION_REQUEST_SET_AUTOFILL_SERVICE.

Also removed obsolete 'cmd autofill save'

Bug: 2153814
Test: manual verification

Change-Id: I082e6bb098e9be5d9e26d0941efcf6f28ab01e1d
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
db041188bc9ca03bed3c14a7ca1b3eb9524a9287 22-Apr-2017 Felipe Leme <felipeal@google.com> Added APIs that let AutofillService implementations set themselves as such.

Bug: 37576671
Test: manual verification
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: I6fd61f8a2826dbf6b6fce831f3deadf6df025386
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
42775f2a8990c0e599fbfe5b187467f1764c6b75 19-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a way to read the last AutofillSelection." into oc-dev
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/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
aa00896b8dda3b73e8ce73b5caa9308af7e89fa8 18-Apr-2017 Felipe Leme <felipeal@google.com> Clone autofill service settings on managed profile.

Test: manual verification
Change-Id: I9d13e4230265b18444bfd30fd403c5fb98b88159
Fixes: 37351722
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
db5f6c00a45a9d31128e48d48997a29d3f4650d8 07-Apr-2017 Felipe Leme <felipeal@google.com> Who wants...to live...forever? The "Save for Autofill?" dialog does!

Fixes: 37083017
Test: manual verification
Test: CtsAutoFillServiceTestCases pass

Change-Id: Id177fb59810956e4b43c1d357de415d64ab9d89a
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
ff35509ee9ef89f42607d1424fa6b4df8de98a90 03-Apr-2017 Felipe Leme <felipeal@google.com> Adds a config for default autofill service.

Change-Id: I4d2d8637617439c5df3f62426e9bc45a78edc2e3
Fixes: 35708268
Bug: 36790693
Test: manual verification
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
fe9a53bc45fd0124a876dc0a49680aaf86641d3e 31-Mar-2017 Jeff Sharkey <jsharkey@android.com> Consistent dump() permission checking.

This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access. It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
4753bb0c34e068f57fff208529836a7688b3ef41 23-Mar-2017 Felipe Leme <felipeal@google.com> Make auto-fill UI robust

Now the autofill UI tracks the movement of the anchor view,
both real and virtual and while still preventing the filled
app from accessing the chooser UI. This was achieved by using
a popup window in the app process to determine the window
location and adding a window presenter interface to popup
window that controls the actual window addition, removal, and
update which is implemented by the system server.

Test: all autofill CTS tests pass

bug: 36392498
bug: 35708258
bug: 34943932
fixes: 36039182
fixes: 36493078

Change-Id: I0321913b2e2e759f4b17003bf85cb873e63a467c
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
7b7711680244108923f0dbb4ca6e35db7e659e6a 04-Mar-2017 Philip P. Moltmann <moltmann@google.com> TRON log important auto-fill events

Example log from
android.autofillservice.cts.LoginActivityTest#testAutoFill#testAutoFillOneDatasetAndSave
(translated from numbers of human readable string):

AUTOFILL_SESSION_STARTED
package=android.autofillservice.cts
AUTOFILL_REQUEST
type=TYPE_SUCCESS
package=android.autofillservice.cts
FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
FIELD_AUTOFILL_NUM_DATASETS=1
AUTOFILL_FILL_UI
type=TYPE_ACTION
package=android.autofillservice.cts
FIELD_AUTOFILL_NUM_DATASETS=1
FIELD_AUTOFILL_FILTERTEXT_LEN=0
AUTOFILL_DATASET_APPLIED
package=android.autofillservice.cts
FIELD_AUTOFILL_NUM_VALUES=2
FIELD_AUTOFILL_NUM_VIEWS_FILLED=2
AUTOFILL_SAVE_UI
package=android.autofillservice.cts
FIELD_AUTOFILL_NUM_IDS=2
AUTOFILL_DATA_SAVE_REQUEST
type=TYPE_SUCCESS
package=android.autofillservice.cts
FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
AUTOFILL_SESSION_FINISHED
package=android.autofillservice.cts

Test: Ran auto-fill tests and looked at event log.
Change-Id: I58aaa58e4435e7d04c8cd91878411943d3eb13de
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.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
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
2f8fb1f62f2840701e3e16497eb8191f38b72e0b 13-Mar-2017 Svet Ganov <svetoslavganov@google.com> Fix a few auto fill ussues

1. Ensure clicking on a focused view brings up autofill if needed

2. Notify the autofill manager in a couple of cases we missed

3. Renamed the AutofillManager app facing APIs to better reflect what
they do and added a API for the app to cancel the autofill interaction

4. Fix view structure dispatch where the ordering of children for autofill
was mixed with ordering of direct view children - the autofill children
may be indirect as views can be marked not important for autofill

5. Show scrollbars only if there are more fill options than want is shown

6. Show only three fill options and the rest can be accessed with a scroll

7. Remove the list divider to allow fill items to control all fill window content

8. Renamed the autofill manager internal service classes to xxAutofillxx

9. Fixed a comment that was not addressed in a previous CL

10. Showing max three fill options - rest needs a scroll

11. Make sure fill UI shown when filter with no matches is changed
to filter with some matches

12. Make sure the fill window has a shadow

Test: Autofill CTS tests pass and manual

bug:36038929
bug:36040101
bug:36149166
bug:36034681
bug:36126001
bug:36035654

Change-Id: Ic8726146fc3c0a19d3e536becdd63fb65622136e
/frameworks/base/services/autofill/java/com/android/server/autofill/AutofillManagerService.java