Commit Graph

2219 Commits

Author SHA1 Message Date
Sergey Volnov
0115ede5b4 Promote System APIs to also be Test APIs for Content Capture Data
Sharing.

This is to be able to test them with CTS suite.

Bug: 145205247
Test: built Android, CTS is coming.
Change-Id: I28cc804be06ee3adbfd1e139803eed2ab10715ca
2020-02-11 23:29:07 +00:00
TreeHugger Robot
28345b2cba Merge "Incremental install via adb." 2020-02-10 19:22:46 +00:00
Philip P. Moltmann
41308eced1 Merge "Revert "Activity start: Send featureId from context->AppOpsManager"" 2020-02-10 16:31:33 +00:00
Philip P. Moltmann
e7421e92d9 Revert "Activity start: Send featureId from context->AppOpsManager"
Revert "Adjust monkey to changed internal APIs"

Revert "Test featureId is correctly used in startActivity"

Revert submission 10111030-activityStarter_featureId

Reason for revert: presubmit test breakage
Reverted Changes:
Ic7056b492: Activity start: Send featureId from context->AppOp...
I8e2a07da7: Adjust monkey to changed internal APIs
I7a6af6fb1: Test featureId is correctly used in startActivity

Change-Id: I48c55a962c990b22ea49e923baa7c73b121d179b
2020-02-10 16:14:12 +00:00
Alex Buynytskyy
cd4d3875e2 Incremental install via adb.
- passing V4 signature to IncFS,
- cleanup and use InstallationFile everywhere,
- pass params to DataLoader creation,
- minor refactor for PackageManagerShellCommandDataLoader to prepare for
Incremental data loading.

Test: atest PackageManagerShellCommandTest
Bug: b/136132412 b/133435829
Change-Id: Iacc3e4c51c0fa3410b076147ce153a1303246189
2020-02-10 07:06:34 -08:00
TreeHugger Robot
f0e9300080 Merge "Statsd logging of notification cancels." 2020-02-09 20:37:30 +00:00
Philip P. Moltmann
6e406c8ae7 Merge "Activity start: Send featureId from context->AppOpsManager" 2020-02-08 22:54:50 +00:00
Philip P. Moltmann
9c5226fe36 Activity start: Send featureId from context->AppOpsManager
The expected usage pattern for noteOp is to get the
Context#getOpPackageName() and Context#getFeatureId() in the calling app
and the call

noteOp(callingPackageName, Binder.getCallingUid(), callingFeatureId)

As the featureId parameter is new this parameter has to been piped all
through from the ...Manager classes running in the app all way deep into
the bowels of the system server.

There is a special featureId==null for the "default" feature. This is
used in two cases:
- In case the system server (packageName == null || packageName ==
  "android") makes a call
- In the case there is no caller. In this case I left annotations in the
  code to make clear that the default feature is used

Raw binder interfaces (defined in AIDL files) are not supposed to be
used by apps. Still historically this has happened and we ended up with
@UnsupportedAppUsage tags in these files. Also AIDL does not support
two methods with the same name but different parameters. I.e. in the
case when I had to add a paramater to a method tagged as UnsupportedAppUsage I
- created a new method ...WithFeature with the additional paramter
- set a maxTargetSDK for the old method and mention the public API to
  use in the deprecation method
This is really not pretty. Once there is no more app using the old
internal API this hack can be removed.

Additionally this change removed all internal calls to
AppOpsService.noteOperation and AppOpsService.checkOperation and
replaces them with the public API equivalent. This sometimes means to
move the resolution of the mAppOpsManager to be lazy.

Exempt-From-Owner-Approval:: Just piping through arguments
Bug: 136595429
Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/am/
      atest CtsAppOpsTestCases added test to cover activity start
      atest WmTests
Change-Id: Ic7056b492cb1c9a79158e6c2b4864898a0eb5b2a
2020-02-08 22:53:43 +00:00
Julia Reynolds
d05b0a7f66 Merge "Add support for Conversation settings" 2020-02-08 11:48:17 +00:00
Will Brockman
75c6057193 Statsd logging of notification cancels.
Logs notification cancel only if the notification was in fact posted.

Uses the UiEventReported framework.  Tweaked that framework to handle
null InstanceIds better.

Bug: 146488473
Test: atest NotificationManagerServiceTest BuzzBeepBlinkTest RoleObserverTest
Test: statsd_testdrive 90 244
Change-Id: Ifd6946ce64c3a09f8cac436bb7087ec56521486c
2020-02-07 16:03:49 -05:00
TreeHugger Robot
cceb2c2e61 Merge "Send autofill assist structure data to content capture" 2020-02-07 18:41:58 +00:00
Mihir Patel
4770be2d60 Send autofill assist structure data to content capture
Test: manual
Change-Id: I23339a8f90dbb6c31f473e6163ba0866518cb0a4
Bug: 147232107
2020-02-07 10:40:15 -08:00
Fabian Kozynski
61cca06252 Merge "Change BOOLEAN_TILE to TOGGLEABLE_TILE" 2020-02-07 17:52:20 +00:00
Fabian Kozynski
489ad0d446 Change BOOLEAN_TILE to TOGGLEABLE_TILE
Also changed internal SystemUI function names

Test: atest
Test: manual
Fixes: 147287512
Change-Id: I39ac6f48804dbec165927163dbc47fc5e7dc83d0
2020-02-07 10:30:45 -05:00
Julia Reynolds
882f206956 Add support for Conversation settings
Test: atest
Bug: 137397357
Change-Id: I68df21cc94d4964b417cad7aaad05526e1b4f967
2020-02-07 09:06:12 -05:00
TreeHugger Robot
21d778f061 Merge changes I640f6470,Idca3ccc6
* changes:
  add java doc for SoundTriggerManager.Model
  fix naming discrepancy in SoundTrigger
2020-02-07 01:07:14 +00:00
TreeHugger Robot
6cd4ee4ce6 Merge "add getters to SoundTrigger.ModelParamRange" 2020-02-06 21:43:42 +00:00
TreeHugger Robot
a7db3c8e79 Merge "Add a flag to allow system health experiment for the behavior change ... of getDefaultTextClassifierImplementation()" 2020-02-06 11:50:42 +00:00
Svetoslav Ganov
2dccbf2d60 Merge "Scrollable inline keyboard suggestions" 2020-02-05 18:52:35 +00:00
Nicholas Ambur
ce5cd840c9 fix naming discrepancy in SoundTrigger
adjusted SoundTrigger.AudioCapabilities constants

Bug: 148853209
Test: manual bulid and test
&& atest SoundTriggerMiddlewareImplTest

Change-Id: Idca3ccc671b90f6f31c872669400b44fbbd5b9bd
2020-02-05 09:50:38 -08:00
Nicholas Ambur
b6e48c213d add getters to SoundTrigger.ModelParamRange
Bug: 148852573
Test: manual test app with GTS test
Change-Id: Id8660ce70f926689449119f455579bc2ad2454cb
2020-02-05 09:50:33 -08: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
Tony Mak
df5d4bff7e Add a flag to allow system health experiment for the behavior change ...
of getDefaultTextClassifierImplementation()

Once the system health experiment is done, revert this change and
remove the local TC.

Test: Manual
1. Set use_default_system_text_classifier_as_default_impl to be false
   by using device_config command. Select a phone number.
   Verify the phone action is shown. Verify dumpsys textclassification
   shows that default TC is bound.

2. Set use_default_system_text_classifier_as_default_impl to be true.
   Reboot the device.
   Select a phone number and verify the phone action is shown.
   Verify dumpsys textclassification shows that the default TC
   is not bound.

BUG: 148049185
Change-Id: I602c3cb6d7bef468cba50be6ed8d799d79af8240
2020-02-05 11:43:07 +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