Commit Graph

2242 Commits

Author SHA1 Message Date
Feng Cao
6c821f6ea1 Merge "Introduces the Bundle to inline suggestions APIs to encode custom UI styling information." 2020-02-19 22:35:42 +00:00
TreeHugger Robot
8887c6da17 Merge "Controls API - Publisher change - Phase 1" 2020-02-19 20:07:24 +00:00
Feng Cao
36960ee20e Introduces the Bundle to inline suggestions APIs to encode custom UI styling information.
* The bundle will be generated/consumed by the support library.
* More API documentation and example usage will be added later once we have the support library impl ready.
* The old style resource name approach doesn't work due to the potential mismatch in the support library version across the host IME and the platform renderer service, and the non-static nature of the public attribute int id in the support lib.
* The Bundle added to the onCreateInlineSuggestionsRequest() is intended for the platform/ExtServices to communicate the UI versions it supports.
* The Bundle added to the InlinePresentationSpec is intended for the IME to communicate the custom styles for the chosen UI versions.

Test: manual verification, and also atest CtsInputMethodTestCases:InlineSuggestionInfoTest CtsInputMethodTestCases:InlineSuggestionTest CtsInputMethodTestCases:InlineSuggestionsRequestTest CtsInputMethodTestCases:InlineSuggestionsResponseTest
Bug: 146454892

Change-Id: Id7fea32a7550fb924fec811b376790474a7b92eb
2020-02-19 09:42:22 -08:00
Julia Reynolds
042ebb1dc8 Merge changes from topics "jr-all-convo", "jr-default-vic"
* changes:
  Optionally make VICs bubble
  Add method to retrieve all conversations
2020-02-19 12:24:56 +00:00
Matt Pietal
d0553b04ee Controls API - Publisher change - Phase 1
Migrate to use publishers apis and deprecate consumer apis that are in
use, remove consumer api not in use. Default apis to provide a smooth
transition. Defaulting will be removed, as well as all consumer code
in the next CL

Bug: 149398610
Test: atest ControlsBindingControllerImplTest ServiceWrapperTest
ControlsProviderLifecycleManagerTest
Test: ControlProviderServiceTest

Change-Id: I014f2b083edc00825e08c82463ec39c148ad9b28
2020-02-19 05:44:26 -05:00
Rajeev Kumar
bc79dcd87b Framework changes to enable Notification listeners on Android Go.
Bug: 148575561
Test: atest
com.android.server.notification.NotificationManagerServiceTest, atest com.android.server.notification.NotificationTest

Change-Id: I1b24b2c8e9c6dd96dcd7be209bae2df7c0ed76b5
2020-02-18 15:50:27 -08:00
TreeHugger Robot
003dedcc7d Merge "Controls API - Remove unnecessary templates" 2020-02-18 18:15:20 +00:00
Julia Reynolds
0297145502 Add method to retrieve all conversations
Test: atest
Bug: 149583455
Change-Id: Ib57e9d738fc029fd4d63e83f90a2296115150ef7
2020-02-17 20:36:44 -05:00
TreeHugger Robot
02b797b3f9 Merge "Add an API to allow AugmentedAutofillService to request an autofill." 2020-02-16 08:45:18 +00:00
Sean Pont
59ecddf837 Merge "Improve QuickAccessWallet documentation and client." 2020-02-16 04:30:17 +00:00
Feng Cao
0fd5641dd7 Add an API to allow AugmentedAutofillService to request an autofill.
Test: manual verification
Bug: 149531989

Change-Id: I3b7ade5fb57da344379378b4c50e67b4cbad213c
2020-02-14 23:02:49 -08:00
Adam He
5be0f15801 Response and Dataset authentication via inline autofill.
Bug: 148815880
Test: manual verification
Change-Id: Ic72f6d828521737db5ce890c0e79cd6f8d16a6c6
2020-02-14 16:25:52 -08:00
Sean Pont
72fc25f5a3 Improve QuickAccessWallet documentation and client.
Test: manual - launch quick access wallet
Test: atest CtsQuickAccessWalletTestCases
Bug: b/149575358
Change-Id: I6f0b86dc62c3cd2b85c5b1b378c7b6c9ec663b58
2020-02-14 16:04:42 -08:00
Adam He
4011625638 Move rendering logic for inline suggestions to ExtServices.
Added a render service in ExtServices to connect to the renderer in
androidx.autofill for inline suggestion slices.

Cleaned up old UI rendering code that lived in system_server.

Bug: 146453086
Test: atest ExtServicesUnitTests
Change-Id: I25a7ea438afe524683671c850625ae80dacccfaa
2020-02-14 11:15:43 -08:00
Matt Pietal
9092e6fae5 Controls API - Remove unnecessary templates
DiscreteToggleTemplate and CoordinatedRangeTemplate are no longer
necessary. DiscreteToggletemplate is being replaced by
StatelessTemplate, and there is no need for the latter.

Bug: 149476062
Test: atest ControlTemplateTest
Change-Id: I2cdd3d26c0b306876a47783ead257754966a339c
2020-02-13 11:06:57 -05:00
Philip P. Moltmann
0946037764 Merge "Revert "Revert "Activity start: Send featureId from context->AppOpsManager""" 2020-02-12 18:52:23 +00:00
Philip P. Moltmann
ee29509ecd Revert "Revert "Activity start: Send featureId from context->AppOpsManager""
This reverts commit e7421e92d9.

Exempt-From-Owner-Approval: revert-revert and only piping anyway
Test: 1:1 revert-revert
Bug: 136595429
Change-Id: I44e5fa2019f5604c6e2c08bdd1967129c64a90a7
2020-02-12 18:51:53 +00:00
TreeHugger Robot
1fc4966a00 Merge "Promote System APIs to also be Test APIs for Content Capture Data Sharing." 2020-02-12 03:27:40 +00:00
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
c43c23cc55 Merge "Used ArrayList instead of ParceledListSlice to fix the weird null parceled field type in FillResponse" 2020-02-11 22:46:08 +00:00
Matt Pietal
a3ef50bcce Merge "Controls API - New method for suggested controls" 2020-02-11 21:37:11 +00:00
Alex Buynytskyy
04f7391fc3 Incremental installations in PackageManagerShellCommand.
- onPrepareImage in native,
- allow to check installation type and choose native or managed
dataloaders,
- native data loader for Incremental,
- install-incremental shell command.

Test: atest PackageManagerShellCommandTest
Test: atest IncrementalServiceTest
Bug: b/136132412 b/133435829
Change-Id: I530a8a203fb50132c1869abd0b869036add18699
2020-02-11 13:11:31 -08:00
Feng Cao
d59949675e Used ArrayList instead of ParceledListSlice to fix the weird null parceled field type in FillResponse
Test: manual
Bug: 149240554

Change-Id: I92e0b4e7b9ce9461a6f1603604d1763f554018f5
2020-02-11 12:25:02 -08: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
Matt Pietal
587a5f7f6f Controls API - New method for suggested controls
Add a defaulted method, loadSuggestedControls(), in order to ask an
application for controls to suggest to the user. The idea is that OEMs
can choose a default application, and seed the controls area with a
small number of controls that may be helpful to the user.

Bug: 149037812
Test: atest ControlsProviderServiceTest
Change-Id: Icf9638c2d07988519527c24383693c4b9e0bb6d3
2020-02-07 09:57:50 -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