Commit Graph

2198 Commits

Author SHA1 Message Date
Svetoslav Ganov
2dccbf2d60 Merge "Scrollable inline keyboard suggestions" 2020-02-05 18:52:35 +00:00
Tony Mak
4624cdd12e Merge "Make TCS.getDefaultTextClassifierImplementation returns a ... SystemTextClassifier that is backed by ExtServices" 2020-02-05 14:44:39 +00:00
Julia Reynolds
e79019393a Merge "Separate concept of VIC from DND" 2020-02-05 12:21:25 +00:00
Svet Ganov
17d9d2f22f Scrollable inline keyboard suggestions
Inlined keyboard suggestions are provided by the OS while
hosted by the keyboard. The clicks are detected by the OS
trusted code to release the data. Not all suggestions may
fit on the keyboard suggestion strip and the user may need
to scroll. To support this we are delegating the touch
event stream to the keyboard window as soon as the OS
detects that the user is not clicking, i.e. after a pointer
went down and moved more than the touch slop.

Bug:146535667

Test: atest CtsAutofillTestCases
      atest inputflinger_tests
      atest com.android.server.wm.DragDropControllerTests
      atest android.server.wm.DragDropTest
      atest android.server.wm.CrossAppDragAndDropTests

      added dedicated tests to inputflinger_tests

Change-Id: Iefb732f70a7b593b31ab2f323b0c277e3819f7b7
2020-02-04 16:48:11 -08:00
TreeHugger Robot
e9a69b5667 Merge "Deprecates ChooserTargetService APIs" 2020-02-04 23:10:13 +00:00
Tony Mak
c5a7432ebf Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
2020-02-04 20:36:52 +00:00
Julia Reynolds
24edc00304 Separate concept of VIC from DND
(Very important conversations). Track VICs in a different
field, and update DND (and public apis) to allow
all, important, or no conversations through.

Test: atest, cts
Bug: 137397357

Change-Id: Iae04546eb7c0b1e79cfdbeec7311628cd7ad634a
2020-02-04 14:23:46 -05:00
Adam He
ecd0a6c595 Merge "Updated documentation on new Dataset APIs." 2020-02-04 00:47:38 +00:00
Muhammad Qureshi
e2b2432bc6 Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by
*StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with
FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: Iaa2db34a7be4c3215f62cc36661ba8ac81656baa
2020-02-03 09:17:40 -08:00
TreeHugger Robot
1757289634 Merge "Log FillEventHistory for the inline augmented autofill requests" 2020-02-02 16:17:30 +00:00
TreeHugger Robot
dde20309d8 Merge "Notification instance ids in NMS for statsd logs." 2020-01-30 21:33:18 +00:00
Sean Pont
e1aa29db6f Merge "quickaccesswallet: add presubmit tests" 2020-01-30 18:47:21 +00:00
Will Brockman
cfd983061a Notification instance ids in NMS for statsd logs.
Notification instance IDs are generated by NotificationManagerService
when the notification is first posted, and stored in the
StatusBarNotification so that they can be passed to the SystemUI
process.

Bug: 144022566
Test: atest NotificationManagerService BuzzBeepBlinkTest RoleObserverTest
Test: statsd_testdrive 244
Change-Id: I804786dfa165864257d8801d7e96f2ac0ead960f
2020-01-30 11:35:10 -05:00
Feng Cao
949525b233 Log FillEventHistory for the inline augmented autofill requests
Test: manual
Bug: 147517341

Change-Id: I3cacd7cba8036f589fce8ee8540d6253fe95d475
2020-01-29 14:50:52 -08:00
Sergey Volnov
e453dcef3b Merge "Got rid of cancellation signals in the Content Capture Data Sharing" 2020-01-29 20:24:48 +00:00
Simran Basi
71f8a26730 quickaccesswallet: add presubmit tests
Run the CtsQuickAccessWalletTestCases whenever submitting changes
to the quickaccesswallet api.

Bug: None
Test: None
Change-Id: Ide0540c264f958d04b729e1ccc3cb569b1926cd6
2020-01-29 12:22:23 -08:00
Sergey Volnov
439294404f Got rid of cancellation signals in the Content Capture Data Sharing
Motivation: if the Content Capture service want's to end the session, it
can close the read-fd, while not have finished reading, and that would
result in an exception in the system server, that can later be
propagated to the caller as an error.

Similarly, timeout of the sharing session can be reflected as an error
with a specific error code.

Test: built Android locally and perfomed a manual test.
Bug: 145203958
Change-Id: Iaeb45e0ab68da9fe30dce1ae4eab2354ef56d827
2020-01-29 15:31:00 +00:00
TreeHugger Robot
8326cae642 Merge "Fix response id in FillResponse parceling." 2020-01-28 23:26:39 +00:00
Adam He
4555df2637 Updated documentation on new Dataset APIs.
Bug: 148380267
Test: atest android.autofillservice.cts.DatasetTest
Change-Id: I957d8e57022daabebd62bc7e8563dd71868931c2
2020-01-28 15:23:40 -08:00
Adam He
cb6826a9e2 Fix response id in FillResponse parceling.
Fixes: 148412653
Test: atest CtsAutoFillServiceTestCases
Change-Id: I5c3dfa81d09e613deadf2f3969e3d6122de230db
2020-01-28 14:06:12 -08:00
yingleiw
4a72a74b2a modify quick settings to adopt the accessibility state api
Seperated out the state part from contentDescription. Also changed the
tile on/off states from mocking switch to unavailable/on/off state
description based on State.state. During testing, I removed event
merging (including source node merging) for state and content change
events. Use event text for state description changed part will be in a
seperate CL.

Test: tested on the quick settings tiles for focusing and state change
evnets. With the event merging removed, the state change is announced
when the focus keeps on the tile. Before my change, content change is
not announced when the focus keeps on the tile due to source node change
in event merging.

Fix: 148473520

Change-Id: I5b6aee6f0982cf4e0a3962fbe15239314f3a2de4
2020-01-28 13:31:13 -08:00
Rob Carr
55a32151b4 Merge "WM: Defer transactions for BLAST Surfaces too." 2020-01-28 20:19:18 +00:00
TreeHugger Robot
86c1458a70 Merge "API for Inline Presentation Renderer in ExtServices." 2020-01-28 01:59:58 +00:00
Mehdi Alizadeh
f2c8bc6d11 Deprecates ChooserTargetService APIs
Bug: 148416928
Test: Verify it builds
Change-Id: Ica559d5018167b3ac479d80de01dd3b04fcc42e6
2020-01-27 17:29:21 -08:00
Robert Carr
2e20bcd65e WM: Defer transactions for BLAST Surfaces too.
For switching on BLAST we are implementing deferred transactions for
compatibility. Presently the BLAST Surface is constructed by the ViewRootImpl
and so the WM has no reference to pass when using it as a barrier layer for
deferTransactionUntil. To resolve this we construct and hold a reference to
the BLAST Surface on the server side, and pass it down to the client in relayoutWindow.
We don't use the WindowStateAnimator surface directly as both the BLAST Adapter and
the WindowStateAnimator would then be setting crops on it.

Bug: 146598493
Test: Builds, existing tests pass.
Change-Id: I6513e0442f5c75f01eb8dde5f1924dd7b636163c
2020-01-27 16:47:33 -08:00
Adam He
0430237873 API for Inline Presentation Renderer in ExtServices.
Bug: 146453086
Test: manual verification
Change-Id: I0c68730ce84bfa9df78e1a1b838bd68764668ef2
2020-01-27 11:25:25 -08:00
Matt Pietal
50772e9bcd Merge "Controls UI - Basic impl" 2020-01-27 17:49:56 +00:00
Sergey Volnov
ed8ce564b3 Merge "Use cancellation signals for timeouts and cancel-by-CCService operations" 2020-01-27 15:24:41 +00:00
Matt Pietal
2223179499 Controls UI - Basic impl
The start of basic controls implementation. Support for lights, locks,
and basic thermostat information. Token support is needed only for
mocking at the moment and will be removed.

Bug: 148207527
Test: SystemUiTests

Change-Id: If25c57735ebd314a978d3969934d781eafc4f89c
2020-01-27 09:53:58 -05:00
TreeHugger Robot
607b7ab283 Merge "Move euicc related file to telephony." 2020-01-24 22:08:50 +00:00
Sergey Volnov
ac90cd8bf9 Merge "Implement data sharing API for Content Capture." 2020-01-24 22:05:27 +00:00
Will Brockman
df6817360d Merge "Add logging of NotificationReported statsd atom." 2020-01-24 17:03:04 +00:00
Sergey Volnov
d7e9844445 Use cancellation signals for timeouts and cancel-by-CCService operations
Bug: 148264965
Test: built Android + manually tested
Change-Id: I95f7ec2bb96b8b6d6ead106877f9d7128e3ec209
2020-01-24 16:57:35 +00:00
Sergey Volnov
6e049014a7 Implement data sharing API for Content Capture.
This API allows any whitelisted caller app supply data to Content
Capture Service. CDD suggests to not use standard "binding" mechanisms,
so this is a guaranteed-writeonly way of sharing data.

Test: build Android locally, manual E2E test
Bug: 145203958

Change-Id: If2219acd6aa48f199e4dadd6f18ceb55c258e1d0
2020-01-24 14:58:43 +00:00
Matt Pietal
33887e0a7e Merge "Removed @hide and Parcelable hierarchy" 2020-01-24 11:38:44 +00:00
TreeHugger Robot
cf38272125 Merge "Add inline controller UI fields to the autofill response and IME inline response" 2020-01-24 04:28:41 +00:00
Amit Mahajan
235289719b Move euicc related file to telephony.
All other files were moved earlier. This is a newly added file
that was added in the old location.

Test: basic sanity
Bug: 140908357
Change-Id: I756b5834ddb1031627168a17dc49ce93b5af8219
2020-01-23 18:14:46 -08:00
Will Brockman
2b6959e6cc Add logging of NotificationReported statsd atom.
This obsoletes the MetricsLogger logging in NotificationRecord
and StatusBarNotification, which will be removed after we validate the
new logs.

Bug: 146488473
Test: with statsd_testdrive
Test: atest NotificationManagerServiceTest
Change-Id: Ia24710ab67f760e1a9f22b4d59d9a6e776821f60
2020-01-23 17:01:59 -05:00
Feng Cao
9199498b46 Add inline controller UI fields to the autofill response and IME inline response
Test: build
Bug: 147394280

Change-Id: I4949852bb042390b35962627617d062bcd9b24b9
2020-01-23 11:22:56 -08:00
shengcow
0696c44824 Add system API annotation to expose Incremental classes as system APIs.
Test: None
Change-Id: Iddf69534cd88670af34267287ae8ee63ed24d7c7
Bug: 148217803
2020-01-23 18:09:08 +00:00
Tiger Huang
527244459c Window Manager Flag Migration (12/n)
- Unhide new APIs
- MaxInsets -> InsetsIgnoringVisibility
- Deprecate SystemUI flags
- Deprecate some other stuff

Bug: 118118435
Test: Build, CTS coming soon
Change-Id: I0a0cbdb48258b3779d536668b59e8c88f3c96d18
Exempt-From-Owner-Approval: Trivial rename
2020-01-23 14:11:39 +01:00
Fabian Kozynski
1bb26b5046 Removed @hide and Parcelable hierarchy
This CL removes @hide from all the controls API as well as introduce
some minor changes:

* ControlTemplate and ControlAction are not Parcelable. There are
Parcelable wrappers that stores all the information in the Bundle
produced by #getDataBundle.
* Control supports a customIcon and customColor to override those
defined by deviceType.

Missing:
* Javadoc in some classes/methods
* CTS testing

Test: atest ControlProviderServiceTest
Test: atest ControlActionTest
Test: atest ControlTemplateTest
Bug: 147760868
Change-Id: I3279ecfcc4fabe05a4b278385eb89ea6a92e3a33
2020-01-23 07:28:46 -05:00
Jorim Jaggi
af30559dc3 Merge changes from topic "content_apply"
* changes:
  Force non-floating main app windows to not fit anything
  Introduce Window.setContentOnApplyWindowInsetsListener
2020-01-23 10:52:36 +00:00
TreeHugger Robot
2a8fae9828 Merge changes from topic "voiceinteraction-model-enrollment"
* changes:
  async enrollment support AlwaysOnHotwordDetector
  add KeyphraseModelManager
2020-01-23 02:46:50 +00:00
Nicholas Ambur
f771e6c9f6 async enrollment support AlwaysOnHotwordDetector
Added ability for AlwaysOnHotwordDetector to support async enrollment
performed outside of support detected through KeyphraseEnrollmentInfo.

Bug: 147159435
Test: tested enrollment and availability is updated when enrolling
outside of KeyphraseEnrollmentInfo

Change-Id: Ia5d71e90c062ac100d4c6df760acf0d41920853e
2020-01-22 16:40:18 -08:00
Nicholas Ambur
ef84fc4843 add KeyphraseModelManager
Exposes a set of @SystemApi's allowing the active VoiceInteractionService
to enroll voice models.

Bug: 147159435
Test: manual tested enrollment and unenrollment via bundled
hotwordenrollment application and test app.

Change-Id: I94ef3550df236486401a0a6f9de9d874b9bf9b46
2020-01-22 16:40:13 -08:00
Santiago Etchebehere
0ec06391e2 Merge "[Zoom-out 1/N] Add API in WallpaperManager" 2020-01-22 22:35:43 +00:00
Danning Chen
5ff476a902 Merge "Add isConversation() API to NotificationRecord and a corresponding key in Adjustment" 2020-01-22 19:15:26 +00:00
Santiago Etchebehere
44a2831560 [Zoom-out 1/N] Add API in WallpaperManager
Add an API in WallpaperManager (client and server) and
WallpaperService to pass a wallpaper zoom value to the
wallpaper service and engine.

Bug: 146387434
Test: (added testDeliversZoomChanged)
Test: atest WallpaperServiceTest
Change-Id: Idd9ea2aefb845ad1d330cbdd6e088b926bcfece7
2020-01-22 10:51:04 -08:00
Jorim Jaggi
7fb715c425 Introduce Window.setContentOnApplyWindowInsetsListener
When root-level content containers fit insets, they used to just
apply and consume the entire system insets. However, with the new
Inset APIs, and with deprecating ADJUST_RESIZE IME flag, we want
to give apps an easy way to customize this behavior.

For that, we introduce Window.setOnContentApplyWindowInsetsListener
that returns what kind of margins/padding should be applied and
what should be dispatched to the content views. This is essentially
a replacement for SYSTEM_UI_FLAG_LAYOUT_* as well as
SOFT_INPUT_ADJUST_RESIZE: It allows apps to choose which insets
should be handled on the window level vs view level.

For that, we mark the window decor views as
FRAMEWORK_OPTIONAL_FIT_SYSTEM_WINDOWS, in order to distinguish the
case when support library calls makeOptionalFitSystemWindows(). This
is because of two reasons:
- We don't want the listener to be invoked twice.
- We can not do the compat ping-pong between onApplyWindowInsets
and fitSystemWindows. This is because during the ping-pong, the
result of the OnContentApplyWindowInsetsListener would be lost.
However, we still need to do the compat ping-pong for
ActionBarOverlayLayout in the support library (until that gets
migrated to use onApplyWindowInsets), so we have this separate
dispatching path that only gets used for framework optional
fitting views.

Test: WindowTest
Bug: 118118435
Change-Id: I4b514addd9e094163062d651972f85615b4a35db
2020-01-22 18:09:04 +01:00