* The augmented autofill may dynamically request an autofill request
which will "invalidate" the old suggestions. In case the new request
doesn't return any suggestions, we need to make sure the old
suggestions are removed from the IME.
* See the scenario in https://b.corp.google.com/issues/158038231#comment14
Test: manual
Test: atest android.autofillservice.cts.inline
Bug: 157515522
Bug: 158038231
Change-Id: If85592395ad918197566a5ca556fba8ccc971071
Show a more informative error to the user on touch/long press about
how to handle this situation. Properly animate status changes.
Fixes: 154737944
Test: TYPE_DISPLAY in mock app simulates not found error
Change-Id: I15ce2d2621ea29c97936f9d9022d917637693288
* if the user taps quickly such that there is only ACTION_DOWN and
ACTION_UP, without ACTION_MOVE, it'd be possible that the
isSecure check is not respected. This patch fixes that case.
Test: atest android.autofillservice.cts.inline
Bug: 157772682
Bug: 158038231
Change-Id: Icd21bf2f88259673bb9b20e46e63672648495eac
The camera API, MediaStore.ACTION_IMAGE_CAPTURE requires apps to pass
a content:// URI with write permissions to the camera. Unfortunately,
apps haven't been doing this and we only started hitting problems in R
for two reasons:
1. The FileUriExposedException that should crash apps when they try to
share file:// URIs acroos binder is skipped. This is because, the
image_capture intent is passed across binder as a field in a
ChooserActivity Intent and the child intents are not checked for
file URI exposed
2. Prior to R, when camera gets a file:// URI, camera issues a file
open(2) in its process. This open(2) succeeds because the camera had
write_external_storage permission which gave it write access to all
files on external storage
Now, camera targets R and (2) fails because camera does not have write
access to files owned by other apps. To workaround, we do the
following in the apps process when it targets < R:
a. When we detect a file:// URI for the camera in an Intent, we create
the file on disk if it is not already created.
b. Scan the file to insert it in the database and retrieve a
content:// URI
c. Replace the file:// URI with the content URI in the image_capture
intent
This works because, the system will ensure the camera is granted write
access to the content URI.
Test: Manual
Bug: 156336269
Change-Id: I4849ff5e806a8207650ff7534846c36ecdc6d3c0
The finish() method is used to clear hard references after
the data copy has ended. This fixes a bug where the references are cleared before onError() is attempted to be called.
Test: CTS tests in followup CL
Bug: 157136368
Fixes: 157136368
Change-Id: If924fe388762831af90579e6b00bdf223230e203
Limit to 36 controls: 6 structures with up to 6 controls per structure
Fixes: 153606605
Test: atest ControlsControllerImplTest
Change-Id: Ieddceda4a0902e4b42208680c7a77ee03514a16c
In the test we trigger the manual autofill request programmatically,
because the focus isn't on the field, we will not get the callback
from IME.
It would be better not to ask IME for inline request if the request
is manual and the view is not focused because it's a simpler/safer
approach and manual request without focus should be rare.
Bug: 154661868
Test: atest CtsAutoFillServiceTestCases
Change-Id: I783b2542094cdea547ebd58ce89f30d9cd421708
* Before this change, when the inline suggestion view is detached from
the IME window (e.g. due to layout change), the remote view content
will not show again even after the view is reattached to the window
on the IME side. This patch fixes it by requesting the remote view
owner (the ext services) for a new SurfacePackage when the view is
re-attached to the window (see javadoc of SurfaceControlViewHost for
why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
never released in the ext services. This is done by notifying the
ext services (through system server) when the view is detached from
the IME window, and then the system server will release the
SurfaceControlViewHost if after N(=500) ms the view is not re-attached
to a window.
* After the SurfaceControlViewHost is released, if the view is
re-attached to the window later, a new SurfaceControlViewHost will be
created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
change to allow reusing the same remote view for inline suggestions
during filtering.
Test: atest CtsAutofillServiceTestCases (sanity test)
Bug: 153615023
Bug: 154683107
Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
Currently DreamActivity doesn't handle any configuration changes,
and does not set fixed orientation. So the decor view will be
detached if the activity is relaunching for configuration changes.
Though it also works by making DreamActivity support handling the
changes, all implementations of DreamService may need to add the
corresponding handling. So this fix only keeps the service alive
for compatibility.
Fixes: 154474768
Test: atest DreamManagerServiceTests#testDreamNotFinishAfterRotation
Test: Enter Settings > Display > Screen saver, press "Start now".
The dream service should not be stopped after device rotated.
Change-Id: I454f75d06c4539258eeafd8794a3cb03e0276163
Two recent checkins broke the Javadoc (in both cases, an <h3> wasn't
properly closed). Made the fix by hand to the HTML output in
cl/309818465 but we need to make the corresponding change to
the Java source or it'll get reverted next time we update the reference
docs.
Staged to:
go/dac-stage/reference/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/android/service/autofill/AutofillService
go/dac-stage/reference/kotlin/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/kotlin/android/service/autofill/AutofillService
BUG: 155669442
Exempt-from-owner-approval: Docs-only change
Test: make ds-docs
Change-Id: I97be9550689544304dff276cf3c9406f9cd98408
* The use case of this API was for augmented autofill service to send
updated suggestions
* Before this change, the dynamic autofill request by the augmented
autofill service only triggers a manual request, but this has caused
some regular autofill providers to always some suggestion due to
their special handling for the manual request. Thus the augmented
autofill service will not receive the request.
* With this cahnge, the request cancels the previous session to start a
new session, and also it triggers a regular request (non-manual) so
the autofill provider will not special handle the request.
Test: atest CtsAutoFillServiceTestCases
Bug: 154543563
Change-Id: I233125a6070394a102ad40b9a50b98a43d952b9f
* Before this change, the suggestionRoot would intercept all touch
events so that it can optionally forward them to the IME process
to support scrolling, no touch event will be sent to the child
view through the regular event dispatching process.
* With this change, we move the touch event transferring (to IME)
logic from SuggestionRoot's onTouchEvent to dispatchTouchEvent.
Now the touch events before a scroll is detected will be sent to
the child chip view, and only the touch events after a scroll is
detected will be sent to the IME.
* This patch also move the OnClickListener and OnLongClickListener
from the root view to the chip view, since the touch events now
either goes to the chip view or to the IME process.
* Note that in order to achieve this, given that we can't change
the API, and there is existing OnLongClickListener registered
to the chip view, we have to add a @hide API to the View to
get the existing OnLongClickListener and attach a new one to the
chip view, such that we can do the additional work of sending
the long click event to IME, when the view is long clicked.
* This patch should also fix the a11y talkback mode bug where
double-tapping on the view doesn't autofill the value.
Double-tap and hold also works that it triggers the attribution
dialog.
Test: atest CtsAutoFillServiceTestCases (sanity test)
Bug: 155245913
Bug: 154149807
Change-Id: I6f7be1ea5c0955969abb4ccae0cb421423095c4d
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.
Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
Use POWER_MENU_LOCKED_SHOW_CONTENT to control lock screen behavior for
the Quick Access Wallet.
Do not provide Intents that will fail to start an Activity.
Update comments.
Bug:155232731
Bug:155186709
Test: manual
Test: atest CtsQuickAccessWalletTestCases
Change-Id: I78e5355a69d666aee6dd122389edabed170f07b2
Because of the new app visibility constraints introduced in Android R,
apps may be unable to load icons from the TextClassifierService (TCS).
This is because the TCS returns "Icons" based on resources to the apps.
These resources were globally available until this new restriction.
In this CL, the TCMS rewrites responses with Icon(typ=RESOURCE) coming
from a TCS to responses with Icon(typ=URI). The new icons are backed
by a content provider that may be used to retrieve the necessary icons.
Bug: 151847511
Test: atest tests/tests/textclassifier/src/android/view/textclassifier/cts
Test: atest core/tests/coretests/src/android/view/textclassifier
Test: Select a phone number text, check that the "Call" icon shows
Change-Id: Ib63e54462508029cdf0e56c2c6a82ff4e81b02a8
Adds filter to prevent passing binder objects in the extras and styling
APIs for inline suggestions. Avoids these to be used to send over remote
objects for Autofill provider and IME to communicate through private APIs
bypassing the OS.
Bug: 152316540
Test: atest CtsAutoFillServiceTestCases
Test: atest InlineSuggestionsRequestTest
Change-Id: I00940a845ed0e2546cbe09fa36e2439869c2f783
Including a one time reset of dogfooders/dev preview users
Test: manual - value is reset on first boot
Test: manual - change value, reboot, value is maintained
Fixes: 154234926
Change-Id: I5e4b338d6d7cc30dec1b12d31c3f1461c6f664cc
KeyphraseEnrollmentInfo is used for testing the system enrollment
application support within GTS.
Bug: 153264697
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest# \
testAllSystemKeyphrasesAndLocales
Change-Id: I66558cf849f2815f2c917d128f9f9cc0673750ef
Merged-In: I66558cf849f2815f2c917d128f9f9cc0673750ef
The low profile in DreamService was used to hide the status bar and
navigation bar. Now this is done by
WindowInsetController.hide(systemBars()) in DreamActivity.
Bug: 151749301
Test: m && flash && verify that system bars don't show up
Change-Id: I8fc9ca67262e92422afb472ccd76ec561c90f66d
CL assigns null to DreamService.mActivity when the DecorView of the
main window is detached (in onViewDetachedFromWindow()). This is also
when the Window is detached, so at that point the DreamService doesn't
care about the DreamActivity.
Fix: 152994058
Test: atest DreamManagerServiceTests
Change-Id: I716f443b2876a2db57df999a551eee31e98ab4f1
Fixing a typo in the previous commit: s/remove/put/
Bug: 153013604
Test: ran CTS tests on sdk_gphone_x86
Change-Id: Iabe8ce51f38ac921aa5cc0e78b559e4a512b9273
Now it's unified with callback FS connector - we are passing the
callback pointer directly to dataloader. This restricts access only
to methods we want and only by someone we want.
Bug: b/153468113
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ib557ebbe7c6c5ce92140eb20534a3626b3ac96d3