This problem was not detected by CTS tests because the exception is
"harmless" (it's just ignored), but it can be verified at logcat:
W Binder : Caught a RuntimeException from the binder stub implementation.
W Binder : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.service.autofill.FillResponse.getAuthentication()' on a null object reference
W Binder : at com.android.server.autofill.ViewState.maybeCallOnFillReady(ViewState.java:159)
Bug: 35707731
Test: CtsAutoFillServiceTestCases pass
Test: manual verification
Change-Id: I58330a7e91b2c186bf97897b7d39640010ca630b
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
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
- Added an int state.
- Removed mValueChanged and use state.
- Removed unused mAuth
- Set its Fillresponse in the proper places.
- Encapsulated private attributes.
- ...except mId (which is now id).
- Stored only id of current view state on Session.
This refactoring didn't modidy any behavior - in fact, the CTS tests didn't
change - but it will make it much easier to implement partitioning.
BUG: 35707731
Test: CtsAutoFillServiceTestCases pass
Change-Id: Ib07929a4089201a0e5bb66004af91f6cba362ba4
Such separation will make it easier to maintain them...
Bug: 35707731
Test: CtsAutoFillServiceTestCases pass
Change-Id: I7164598e1ce54dca8cdb8286f65ec4baa926f98d
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
- Call removeSelfLocked() on cancelSessionLocked.
- Call removeSelf() after dispatching the PendingSaveRequest.
- Added a finalizer callback to PendingSaveRequest that calls removeSelf().
- Fixed SaveUi SnackBar so its actions are only triggered once.
- Reused removeSelfLocked() when needed.
- Removed unnecessary {} on some lambdas.
- Removed unnecessary mLock on PendingSaveRequest.
- Removed unnecessary mLock usage on PendingFillRequest.
Test: CtsAutoFillServiceTestCases (including new tests) pass
Test: manual verification
Fixes: 35721501
Fixes: 35844249
Change-Id: I9789218777b62a9558a602b8eaed0714d8b77fa0
This event is called when:
- After notifyViewEntered() when autofill is disabled.
- After service returns an "empty" FillResponse to FillCallback.onSuccess().
BUG: 36056207
Test: LoginActivityTest.testAutofillCallbackDisabled
Test: LoginActivityTest.testAutofillCallbackNoDatasets
Test: VirtualContainerActivityTest.testAutofillCallbackDisabled
Test: VirtualContainerActivityTest.testAutofillCallbackNoDatasets
Change-Id: I7b8636473f738bf600aa96b28c77827b2cc78815
- 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
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
throw and handle errors if the wrong value is set for a view
Test: android.autofillservice.cts.AutofillValueTest
Change-Id: Ida80da7913a210bede6c47d6b7a6f215a012a84c
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
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
1.Fixed race condition on save request - if the service was unbound, it would
mark the RemoteFillService as completed and the retry would be dropped.
2.Removed session when save request is canceled.
Change-Id: Ib71514cdcfecc38c07dd7656174d0db68ed758d1
Fixes: 36001206
Test: CtsAutoFillServiceTestCases pass
Some custom views - like WebView - might have their own auto-complete mechanism,
so we need to provide a way for them to know when the auto-fill UI is shown or
hidden.
Fixes: 35948429
Test: CtsAutoFillServiceTestCases (with new tests) pass
Test: m update-api
Test: manual verification
Change-Id: I5682a3b9645d5d077a4a2446e79256d6f77b4b5a
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
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
1. Abstracted the fill/save view and window management
in dedicated classs
2. Avoided the need of a second window to detect outside
touches
3. Simplified the fill-ui window management
4. Moved the UI in its own package to ease mmigration to
sys UI.
5. Removed hard-coded colors from the layout
6. Make sure the save UI cannot grow as wide as the screen
as this would not look good on tablets
7. Update the save UI to look closer to mocks
Test: CTS tests pass
Bug: 35708258
Change-Id: Ia74a5aad6f16bba0047a9e8e61958c77af0d358d
- Shorten history line by removing less relevant items.
- Decrease number of history items (from 100 to 20).
- Removed redundant logs from service (and kept them on manager)
- Use {} on all log statements.
- Remove DEBUG guard on some important messages.
- Remove DEBUG guard from service-side toString() implementations.
- Don't log FLAG_FOCUS_LOST actions.
BUG: 33197203
Test: manual verification
Change-Id: I30466ab3c0d12cfa2ad68b2b2a107d5890256845
It was accidentally broken during a previous commit where the CTS test
failure was ignored by a known issue being fixed in another change -
this change fixes both problems.
Bug: 33550221
Bug: 3380254
Test: CtsAutoFillServiceTestCases pass (for real now :-)
Change-Id: I5b2aa6060995ca255e51d85aa6ec93a886fa522f