Commit Graph

1307 Commits

Author SHA1 Message Date
TreeHugger Robot
40279e5407 Merge changes I6993325b,Icb5114fe
* changes:
  Frameworks: Annotate trivial @GuardedBy in services/core
  Frameworks: Annotate trivial @GuardedBy in core/java
2018-02-08 23:32:03 +00:00
Jiuyu Sun
d3bb4aed78 Revert "Public EuiccManager APIs."
This reverts commit af6a5fffdc.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Id3296a91e5c3ad624a6a03f6532b859524a518bf
2018-02-08 16:38:26 +00:00
Andreas Gampe
3f24e69dbe Frameworks: Annotate trivial @GuardedBy in core/java
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Icb5114fea2ff2385e1cc7511121026099e05c0ee
2018-02-08 02:19:42 -08:00
Holly Jiuyu Sun
af6a5fffdc Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: Id7895f9b35ce9d4fb6fae42ba89ca9b29dbfa74c
2018-02-07 11:09:27 -08:00
felipeal
d1d0e4ae1a Dump autofill compat packages.
Test: manual verification
Bug:72811034

Change-Id: Iee815a84e4ff9fa1ace9301b5da7c883d4e753b8
2018-02-05 15:51:17 +01:00
Svetoslav Ganov
24c90450fe Autofill compatibility mode.
Autofill helps users fill credentials, addresses, payment methods,
emails, etc without manually typing. When focus lands on a fillable
element the platform captures a snapshot of the screen content and
sends it to an autofill service for analysis and suggestions. The
screen snapshot is a structured representation of the screen content.
If this content is composed of standard widgets, autofill works
out-of-the-box. However, some apps do their own rendering and
the content in this case looks like a single view to the platform
while it may have semantic structure. For example, a view may render
a login page with two input test fields.

The platform exposes APIs for apps to report virtual view structure
allowing autofill services to handle apps that have virtual content.
As opposed to apps using standard widgets, this case requires the app
developer to implement the new APIs which may require a fair amount
of code and could be seen as a processes that could take some time.
The most prominent typs of apps that fall into this category are
browsers.

Until most apps rendering virtual content and specifically browsers
don't implement the virutal APIs, autofill providers need to fall-
back to using the accessibliity APIs to provide autofill support
for these apps. This requires developers to work against two sets
of APIs - autofill and accessibility - which is incovenient and error
prone. Also, users need to enable two plugins - autofill and
accessibility which is confusing. Additionally, the privacy and
perfomance impact of using the accessibility APIs cannot be addressed
while autofill providers need to use thes APis.

This change adds an autofill compatibility mode that would allow
autofill services to work with apps that don't implement the
virtual structure autofill APIs. The key idea is to locally enable
accessibility for the target package and remap accessibility to
autofill APIs and vise versa. This way an autofill provider codes
against a single set of APIs, the users enable a single plugin,
the privacy/performance implications of using the accessibility
APIs are addressed, the target app only takes a performance hit
since accessibility is enabled locally which is still more efficient
compared to the performance hit it would incur if accessibility is
enabled globally.

To enable compatibility mode an autofill service declares in its
metadata which packages it is interested in and also what is
the max version code of the package for which to enable compat
mode. Targeted versioning allows targeting only older versions of
the package that are known to not support autofill while newer
versions that are known to support autofill would work in normal
mode.

Since compatibility mode should be used only as a fallback we
have a white list setting with the packages for which this mode
can be requested. This allows applying policy to target only
apps that are known to not support autofill.

Test:
     cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
     cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:72811034

Change-Id: I11f1580ced0f8b4300a10b3a5174a1758a5702a0
2018-02-02 19:34:26 -08:00
Beverly Tai
863ad0eed2 Merge "Move zen description to ZenModeConfig" 2018-02-02 15:27:04 +00:00
Beverly
a5effb4542 Move zen description to ZenModeConfig
Test: manual
Bug: 72570739
Change-Id: I0b38e9fb9568de0207238f24453c2b216381537a
2018-02-01 17:23:38 -05:00
Doris Ling
8356481ba2 Add icon tintable flag to suggestion.
Bug: 72330968
Test: rebuild
Change-Id: Ic11713300311ff81347efc72ea10bf9aa99f7b1c
2018-01-31 16:41:10 -08:00
TreeHugger Robot
0f069cc224 Merge "Minor javadoc clarification." 2018-01-31 20:27:31 +00:00
TreeHugger Robot
b7158102ba Merge "Changed dataset methods that take a Pattern filter to accept null." 2018-01-31 19:32:37 +00:00
Felipe Leme
09d58a4e3b Changed dataset methods that take a Pattern filter to accept null.
In this case, null means the field should not be filterable, which is useful
in the cases where it represents a non-authenticated value like a password.

Test: atest CtsAutoFillServiceTestCases:LoginActivityTest#filterTextDisabledUsingNullRegex
Test: atest CtsAutoFillServiceTestCases:LoginActivityTest

Bug: 71359055
Fixes: 72711778

Change-Id: Idc8248f6c95fdb50b934840689616e42ddd6378c
2018-01-31 17:47:12 +00:00
Felipe Leme
c83abcb3dd Minor javadoc clarification.
Test:  mmm -j frameworks/base/:doc-comment-check-docs
Bug: 72693031
Fixes: 72562886

Change-Id: Ia9c3ac12cb41eea7ee30f7ec6c2e68b5603751fd
2018-01-30 22:54:49 -08:00
TreeHugger Robot
8420d5e596 Merge "Introduce a TextClassifierManagerService." 2018-01-31 05:26:27 +00:00
TreeHugger Robot
d7e0860b43 Merge "Re-added support for deprecated BIND_AUTOFILL permission." 2018-01-31 03:20:10 +00:00
TreeHugger Robot
8fe62bea0b Merge "New autofill APIs: DateTransformation and DateValueSanitizer." 2018-01-31 03:02:41 +00:00
Felipe Leme
87b7f8f1b8 Re-added support for deprecated BIND_AUTOFILL permission.
This permission was renamed during the O previews but it was supported on the
final O release, so we need to carry it over.

Test: atest CtsAutoFillServiceTestCases
Bug: 70682223

Change-Id: I2b3d798fe9c09751138f154e6e69e6af6b60dbb1
2018-01-30 12:28:19 -08:00
Abodunrinwa Toki
d32906c202 Introduce a TextClassifierManagerService.
Apps wanting to use a TextClassifier service (instead of an
in-app-process TextClassifier) bind to this service. The service
binds to and reroutes calls to a configured system TextClassifierService.

TextClassifierManagerService manages the lifecycle of the configured
TextClassifierService and binds/unbinds to preserve system health.

A configurable TextClassifierService extends TextClassifierService,
declares an android.textclassifier.TextClassifierService intent, and
requires a permission that is only granted to the system so only the
system may bind to it.

The TextClassifierManagerService implements a similar interface to
TextClassifierService (i.e. ITextClassifierService) but doesn't have to.
This is done for simplicity sake and things may change in the future.

The configuration of the default service is in config.xml.
OEMs may change this with a config overlay.
If no TextClassifierService is specified, the default in app process
TextClassifierImpl is used.

Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: tbd
Change-Id: I8e7bd6d12aa1a772897529c3b12f47f48757cfe6
2018-01-29 17:16:21 -08:00
Felipe Leme
c8c0a82f56 New autofill APIs: DateTransformation and DateValueSanitizer.
These APIs are useful when an app uses a date value for a credit card
expiration date.

Test: atest CtsAutoFillServiceTestCases:DateValueSanitizerTest \
            CtsAutoFillServiceTestCases:DateTransformationTest \
            CtsAutoFillServiceTestCases:CustomDescriptionDateTest

Fixes: 72450441

Change-Id: Ie17ab17aa07e0401f4dbba3faa80cc2cc2e7d783
2018-01-29 15:26:26 -08:00
Felipe Leme
f0baef7460 New Autofill APIs for UserData id.
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest CtsAutoFillServiceTestCases:UserDataTest

Bug: 70407264

Change-Id: Id49efc88e1ccbfa2634bcb6ccaa3371f6fd2ed4e
2018-01-29 11:10:22 -08:00
TreeHugger Robot
431af2d3f6 Merge "Alarms and Media visibly muted in PriorityOnly dnd" 2018-01-29 15:45:39 +00:00
Beverly
925cde8f74 Alarms and Media visibly muted in PriorityOnly dnd
- if alarms and/or media cannot pass dnd and the phone is currently
in priority only dnd, then the alarm and/or media volume stream
will appear muted in the volume dialog and sound settings
(Settings > Sound)
- if all behavior for priority only dnd is not allowed to bypass dnd
(discluding alarms and media), then ringer is muted when priority-only
dnd mode is on. If a user clicks this ringer in the volume dialog, then
dnd ends
- Updated default zen config to version 3 (added alarms and media)
Test: manually toggle alarms + media in Settings > Sound > DND >
Behavior, toggle on/off dnd and then look at volume dialog and
volume bars in Settings > Sound
Test: runtest --path cts/tests/tests/media/src/android/media/cts/AudioManagerTest.java
Fixes: 72052742

Change-Id: Ia9e809ec2be93cb5a9ba6518dce04bf3ce45110b
2018-01-26 18:39:06 +00:00
Kweku Adams
9954633827 incidentd: Adding privacy tag and expanding field.
Also updating priority category enum to note new values.
Bug: 65750824
Bug: 72393215
Test: flash device and check incident.proto output

Change-Id: I0c764cd4bb258160aa7140e60e81f76f84cc28ce
2018-01-25 14:59:02 -08:00
TreeHugger Robot
fa0bfce3ef Merge "Add requireViewById" 2018-01-24 17:48:52 +00:00
Felipe Leme
fe05a52988 Don't crash the app when the assist structure cannot be retrieve.
When an app trigger autofill, system_server will eventually call back into the
app to lazy load the contents of the AssistStructure used for autofill. If that
binder transaction fails, we should simple ignore it, rather than crash the app.

Test: atest CtsAutoFillServiceTestCases
Test: locally changed code to force WTFs and called 'adb shell dumpsys autofill'

Bug: 72398988

Change-Id: I490ad877b067fb37997b734718b90b00f9d318c8
2018-01-23 17:49:26 -08:00
Chris Craik
6faa9e50e5 Add requireViewById
Bug:69461327
Test: atest android.view.cts.ViewTest android.view.cts.WindowTest android.app.cts.DialogTest
Test: make offline-sdk-docs

Didn't add require versions of #onFindViewById in
FragmentContainer/FragmentHostCallback since they're deprecated

Change-Id: I4231e318c92a39cfb82ab1ef8769ade2775d5e3e
2018-01-23 09:44:00 -08:00
TreeHugger Robot
2c78c181e7 Merge "Track the most recent notifying packages" 2018-01-23 13:56:24 +00:00
Felipe Leme
029f10100c Changed onGetScores() to return null instead of throwing exception.
Callers (Session and AFMShellCommand) already handle null (in fact, the
signature declares it as @Nullable), so there's no point on throwing a
runtime exception...

Bug: 70939974
Test: 'adb shell cmd autofill get fc_score half kale' when service APK was not
      implementing it.

Change-Id: I37da6cd13c40545626332c272759e797b5a25924
2018-01-22 12:16:55 -08:00
Julia Reynolds
7bcb57b79d Track the most recent notifying packages
Test: runtest systemui-notification
Bug: 63927402
Change-Id: I0d4cfb5399c81a31d1192d7ac5149f33d9804c67
2018-01-22 13:49:11 -05:00
Felipe Leme
d11a66220c Minor API changes on Autofill Field Classification:
- Removed Scores class and use float[][] directly.
- Created constant for metadata keys.
- Removed getAlgorithName() from FieldClassification.

Bug: 70291841

Test: m -j update-api
Test: atest CtsAutoFillServiceTestCases

Change-Id: I62abf93c4f6f0804d838c7fb183c0b8bcb88a136
2018-01-19 12:16:21 -08:00
Felipe Leme
e4ac740e39 Implemented getAlgorithm() and getDefaultAlgorithm() using manifest metadata.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest

Change-Id: I8b7028c0acfef164b84821a9e4c99817acc838f8
2018-01-19 09:39:38 -08:00
Felipe Leme
db6b0fecb4 Merge "Moved Field Classification score logic to ExtServices." 2018-01-18 23:33:44 +00:00
Felipe Leme
bc055b0ef1 Moved Field Classification score logic to ExtServices.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest \
            CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases

Change-Id: I75fd59b5d7530fcd7095b26f6e592d7459c7d235
2018-01-18 10:40:30 -08:00
Felipe Leme
6fb52a5fca Use LinkedHashMap on CharSequenceTransformation to keep order of insertions.
Test: atest CtsAppSecurityHostTestCases:CharSequenceTransformationTest#testFieldsAreAppliedInOrder
Fixes: 72118060

Change-Id: Ic8f5120fb4b5d10503a3909528accd0ecf6076f4
2018-01-17 16:19:10 -08:00
Dan Sandler
1d958f8c35 Temporary affordance for blocking helper
When a notification is flagged by NoMan as USER_SENTIMENT_NEGATIVE (odd,
since this is actually the system's sentiment), a small  icon will
appear that directs you to the notification settings.

Eventually the icon will be removed, and the settings (reworded to
explain that you seem not to like this kind of notification) will be
left behind in the shade.

Bug: 63095540
Test: runtest systemui
Change-Id: I8b815cd035e9730bbbf1d4a1be17db9d494111ed
2018-01-13 15:34:57 +00:00
Jiuyu Sun
9e7bf9e304 Merge "Add EuiccCardManager and EuiccCardController." 2018-01-11 18:09:40 +00:00
Lucas Dupin
606c532dca Merge "Allow custom keyguard transient message" 2018-01-11 17:23:59 +00:00
TreeHugger Robot
e6050a4a0f Merge changes from topic "messaging_people"
* changes:
  Clipping to the top roundness when scrolling
  Made the notification side paddings consistent
  Changing messaging style and overall visual adoption
  Improved the MessagingStyle API with Person
  Added People to the Notification API
2018-01-11 03:07:09 +00:00
Holly Jiuyu Sun
5c11024d13 Add EuiccCardManager and EuiccCardController.
EuiccCardManager is in the same path with EuiccManager.
EuiccCardController is in the same path with EuiccController.
Use getAllProfiles() as an example interface.
The implementation of EuiccCard and its content will be added in a
follow up CL.
The new API is marked as @hide and TODO for @SystemApi.

Bug: 38206971
Test: test on phone
Change-Id: I153937c0f79bdd1a00b06b234a6e254a3f43072c
2018-01-10 18:59:50 -08:00
Lucas Dupin
ef88654459 Allow custom keyguard transient message
TrustAgentServices can now present a transient
message on the lock screen or AoD.

Bug: 63940122
Test: call TrustAgentService#showKeyguardErrorMessage via service,
      lock device, wait for message to show up.
Change-Id: I222118787a1afb526ce7c90d46c41d0f20d8d912
2018-01-10 14:07:56 -08:00
Holly Jiuyu Sun
6a85d75fbc Merge "Merge EuiccProfile into EuiccProfileInfo." am: b01bd54b11 am: 6a5dc32ac3
am: 20f35f962e

Change-Id: I8f7cc7e81fc163119ffa15666f054b298d47fff1
2018-01-10 05:58:24 +00:00
Holly Jiuyu Sun
20f35f962e Merge "Merge EuiccProfile into EuiccProfileInfo." am: b01bd54b11
am: 6a5dc32ac3

Change-Id: I3d6df6f2bce5b6e19ce0ef2c13adc39fa1b9a862
2018-01-10 05:49:06 +00:00
TreeHugger Robot
7819f611de Merge "Add API EuiccController#startOtaUpdatingIfNecessary" 2018-01-10 02:38:11 +00:00
Holly Jiuyu Sun
e6153b9bff Merge EuiccProfile into EuiccProfileInfo.
After EuiccCard is moved to the platform, it can depend on
EuiccProfileInfo directly.

Bug: 70292228
Test: unit test
Change-Id: Ibe2c61ce9c4d2c99bac1cd9df8bb62414c46feee
2018-01-09 15:08:26 -08:00
Qingxi Li
6019f9ca34 Add API EuiccController#startOtaUpdatingIfNecessary
This function requests calling app has WRITE_EMBEDDED_SUBSCRIPTIONS
permission. It will check whether the OTA update needed to be done
first. If current eUICC OS isn't latest one and OTA needed to be
performed, it will update eUICC OS. When the OS update is started or
finished, a broadcast will be sent.

Bug: 37279356
Test: E2E
Change-Id: Iea86add4bdc01c79a8714af4b3a89735ba78ee74
2018-01-09 13:33:15 -08:00
TreeHugger Robot
feeb12a962 Merge "Let wallpaper know when to animate AoD transition" 2018-01-05 00:32:25 +00:00
TreeHugger Robot
1e8a6d36bc Merge "Refactored Field Classification score logic so it can be moved to ExtServices." 2018-01-04 19:00:40 +00:00
Qingxi Li
dba6365966 Merge "Add API to get eUICC's OTA status" am: 15a410a75a
am: 412aecc2b0

Change-Id: I50ec4a84ddc30e5232bd0cabb8a721ebb7feca47
2018-01-04 02:09:32 +00:00
Qingxi Li
cc6ad8cab7 Add API to get eUICC's OTA status
The function will return current eUICC's OTA status and requests calling
app has WRITE_EMBEDDED_SUBSCRIPTIONS.

Test: E2E
Bug: 37279356
Change-Id: I823ed7aa9d86530c4bebd4c0b1a00f0c607105ed
2018-01-03 12:42:01 -08:00
Felipe Leme
27f4573d13 Refactored Field Classification score logic so it can be moved to ExtServices.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest \
            CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases

Change-Id: If584ab3a55744a62f427065bfd44c8c219df83e9
2018-01-03 09:27:51 -08:00