Renamed "componentName" to "clientActivity" and "uid" to "clientUid" to
avoid ambiguity.
Bug: 178978545
Test: Presubmit
Change-Id: I66246168bd71f577b9494e91b3a5df086c491cb1
In the InlineSuggestionFactory, it will filter the tooltips by the
field let only the first one can pass to the IME and drop others.
When the IME inflates the inline suggestion, if there is a tooltip of
the suggestion view, inflates the tooltip view at the same time. It
will create the InlineTooltipUi that will be a popup window and
contains the surface view of the tooltip.
Bug: 172024354
Test: atest CtsAutoFillServiceTestCases:InlineTooltipTest
Change-Id: I6f20dcad6d03432017e684964eca52dff2609205
Bug: 168341541
Test: atest CtsAutoFillServiceTestCases:DatasetTest
Test: Manually tested image suggestions when the target app doesn't have media store permissions
Change-Id: I42546c76e45ec404e8d8de3bf63ca094d8a494c6
The test config takes longer than 15mins to run. Move it to a dedicated
group for running slow presubmit Test Mapping tests.
Bug: 174654670
Bug: 174495337
Bug: 175150979
Change-Id: I533e749f57798c4b162a105246b51854a539a65f
Test: None
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script that
identifies relevant "include" directives.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
- Add getLaunchedFromUid and getLaunchedFromPackage into Activity
because they are used in several places.
- Move getActivityClassForToken to ActivityTaskManagerInternal#
getActivityName because it is only used in system server.
- Remove getPackageForToken because it is no longer used.
Bug: 174041144
Bug: 174040691
Test: CtsWindowManagerDeviceTestCases
Change-Id: Iac1581ac2271baf1ab1625ced6cc1f42bf05eaf5
maintenance to Sessions.
* mSessionState is the unique lifecycle State of the current Session.
* mSessionInfo contains metadata and other state identifying booleans
for the current Session.
Bug: 171350451
Bug: 162357598
Test: atest CtsAutoFillServiceTestCases
Change-Id: Id8cead9e5299b3f4e24c035706e04fa46555fc9b
Add basic tests into TEST_MAPPING to make sure the tests can be
tested in presubmit. There is a 30 minutes limitation for presubmit
which doesn't allow to run all autofill tests. We only choose some
tests and add @Presubmit annotation to the tests that want to verify
in presubmit.
The tests contains basic fillUi, saveUi, authentication, filtering,
fill history, virtual view, compat mode. Skip webview because it is
a high flaky fail tests. The presubmit time is 20-30 minutes for now,
we can add/delete the chosen tests in presubmit when we receiving the
fails.
Bug: 154961272
Test: TreeHugger
Change-Id: I25684a2122c4e705b75b9a30c3b7a61337bbd1a7
Starting with S, any app targeting S+ will need to specify
explicitly either FLAG_MUTABLE or FLAG_IMMUTABLE when creating
PendingIntents.
This change helps mitigate against implicit PendingIntent reuse.
At present, all PendingIntents are mutable by default unless
FLAG_IMMUTABLE is explicitly set when creating them. This often
leads to developers accidentally making the PendingIntents mutable
and thus handing their receivers powers to fill in critical fields.
Because the autofill saveui retore mechanism will need to update it,
the PendingIntent should be mutable.
Bug: 170771150
Test: atest CtsAutoFillServiceTestCases
Test: Manual. Make sure the function works normal.
Test: Don't see PendingIntent error log.
Change-Id: I6e03a48968b98dec10e9c9dc05d1f3af42f8f0e5
* Session contains removeFromService() and destroy().
removeFromService() removes the session and also calls destroy()
* AFManagerServiceImpl has renamed methods to remove*Sessions() since
it's actually calling into removeFromService instead of just destroy().
BYPASS_INCLUSIVE_LANGUAGE_REASON=will_do_in_separate_cl
Bug: 162357598
Test: atest CtsAutoFillServiceTestCases
Change-Id: I4ddc4b863b2f3c962408dc0e54f8be5b34ee32b4
Image suggestions (and other rich content) are not handled the same way
as primitive autofill values. These suggestions are also only applicable
to augmented autofill. Therefore, instead of reusing AutofillType and
AutofillValue, we use a separate code path to insert rich content. A
follow-on change will remove AUTOFILL_TYPE_RICH_CONTENT and the
corresponding code on AutofillValue.
Bug: 168837034
Test: Manual and unit tests
atest CtsAutoFillServiceTestCases:DatasetTest
atest CtsAutoFillServiceTestCases:InlineAugmentedAuthTest
atest CtsAutoFillServiceTestCases:InlineAugmentedLoginActivityTest
Change-Id: I4fa3baf2b545908fc25f3a6e28a7addc7004786b
We've been writing many new framework-specific Error Prone checkers
to help detect obscure platform bugs, and this change starts enabling
those checkers for more packages across the platform.
Bug: 155703208
Test: manual
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: I1db3412b0be40f6f78c68331ae01756887192071
We track whether inline request is needed with a separate boolean. This
also resolve the bug where the CountDownLatch was accounting for both
inline and regular request, and errors when due to async on multiple
requests, receives multiple regular request instead.
Bug: 162357598
Fixes: 159417365
Test: atest CtsAutoFillServiceTestCases
Change-Id: I56e11163d9163f73f807f6adf06d93bf26617173
* Move helper methods to static methods in Helper.java
* Add documentation on ambiguous methods.
* Rename method to end with *Locked for consistency.
Bug: 162357598
Test: atest CtsAutoFillServiceTestCases
Change-Id: I1b2f788a74fa16f566520f5e83c2df21ffbca2dc
In order to provide a better user experience, it would better know the
reason why a save dialog was not shown and improve the autofill experience.
So it is necessary to add the reason why a save dialog was not shown to
FillEventHistory.
Bug: 158328375
Test: atest FillEventHistoryTest
Test: atest InlineFillEventHistoryTest
Change-Id: I50c1e40334066d3f4844426c4b03294079a967b2
* Create InlineFillUiInfo to encapsulate the numberous arguments passed
into the factory.
* Combine CreateInlineSuggestions API for regular and augmented
autofill.
Bug: 162357598
Test: atest CtsAutoFillServiceTestCases
Change-Id: I64d5ca2aec510b9e04ebc3c499ca0029dc96925c
UserController calls SystemServiceManager on some stages of the user
switch lifecycle, and SystemServiceManager calls the respective
callbacks in the SystemService objects it manage.
Prior to Android 11, these callbacks would take a @UserIdInt userid,
but now they take a TargetUser (which in turns contains a Userinfo).
So, currently, UserController calls SystemServiceManager passing the
userid, and SystemServiceManager gets the UserInfo from
UserManagerService. That works fine most of the time, but there might
be some race conditions when a user is removed that can crash the
system when such user is stopped (because UserManagerService doesn't
have its UserInfo anymore).
This CL fixes this issue by refactoring the user switch workflow so:
- TargetUser doesn't hold a reference to the UserInfo anymore, but
offer the methods needed by SystemService implementations.
- SystemServiceManager keeps track of the TargetUser objects used in
the callbacks.
Test: manual verification
Fixes: 159831354
Change-Id: If68ab1b5e247c7389c8cac16432d8b8809507e86
This issue causes CTS test failures while running instant mode tests.
This patch will help partners pass instant mode CTS successfully.
Bug: 153099178
Test: atest --instant android.autofillservice.cts.SimpleSaveActivityTest
Change-Id: I2bd6c553c75a1a207d7bfd7113aad5e377880b3e
This is just a plain refactoring: the removed methods in the changed
classes were called by default by the new methods in the superclass
(SystemService).
Test: m
Test: atest NotificationManagerServiceTest BackupManagerServiceRoboTest
Fixes: 161943081
Exempt-From-Owner-Approval: refactoring without side-effects
Change-Id: Ifd8df592eb4494cc0922b7e0b2ff20187b8a8b3e
Root cause
The error message is set by AutofillService, AutofillService calls
FillCallback.onFailure(null) back to the platform. Because a081250
uses String.valueOf(message), this method will make a null object
become to a "null" string. This may cause the Autofill session to
think we should show message because of a non-null message. And if
the AutofillService target SDK is lower than 29, we don't ignore show
message, then users will see a "null" toast.
Solution
Instead of passing the message parameter to String.valueOf() directly
, we check the message first, only passing to String.valueOf() if the
message is not null. And we pass an empty string if the message
parameter is null.
Bug: 159888723
Test: Use a test AutofillService which target SDK is lower than 29,
make sure no null toast is shown
Test: atest CtsAutoFillServiceTestCases
Change-Id: Id7ff581b3a7f35cf97b4f3405a40bfa1a420823e
(cherry picked from commit 3c7ac7de467fbeb905ed4969a2f2fa59f06f11d1)
Root cause
The error message is set by AutofillService, AutofillService calls
FillCallback.onFailure(null) back to the platform. Because a081250
uses String.valueOf(message), this method will make a null object
become to a "null" string. This may cause the Autofill session to
think we should show message because of a non-null message. And if
the AutofillService target SDK is lower than 29, we don't ignore show
message, then users will see a "null" toast.
Solution
Instead of passing the message parameter to String.valueOf() directly
, we check the message first, only passing to String.valueOf() if the
message is not null. And we pass an empty string if the message
parameter is null.
Bug: 159888723
Test: Use a test AutofillService which target SDK is lower than 29,
make sure no null toast is shown
Test: atest CtsAutoFillServiceTestCases:LoginActivityTest#\
testAutofillAgainAfterOnFailure
Change-Id: Id7ff581b3a7f35cf97b4f3405a40bfa1a420823e