Commit Graph

2254 Commits

Author SHA1 Message Date
TreeHugger Robot
59a2ef663a Merge "Clarifying meaning of items param in javadoc per feedback" 2020-02-25 01:05:20 +00:00
Alex Mang
fa1062ac43 Clarifying meaning of items param in javadoc per feedback
Bug: 148402958
Change-Id: Ic021f6fc37e7fce8e9b052d7434d0dc1569724ea
2020-02-24 15:31:41 -08:00
Nicholas Ambur
c6f4118f9e remove client token passing active VI service
Previous implementation relied on client to pass a token which the
service used to verify if it was the active service. This is seen to be
a security concern as there is no way to verify how the client obtained
the token. Instead, a check is done to confirm the caller's UID matches
the UID of the active service.

In the case of voice model enrollment, KeyphraseEnrollmentInfo class is
leveraged. A client is allowed to enroll if it is the active voice
interaction service or if it is a voice model enrollment application
bundled with the system image.

All previous manifest permision checks still apply.

Bug: 148159858
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases -t \
com.google.android.assist.gts.KeyphraseModelManagerTest \
\#testShouldEnrollOnlyWhenActiveService

Change-Id: Ie2c4653d365770a9123a22bc69822518b4ccc568
2020-02-23 20:43:17 -08:00
TreeHugger Robot
92ab20a4da Merge "Use context for correct display in the renderer service" 2020-02-22 18:07:33 +00:00
Svet Ganov
2aa4f10996 Use context for correct display in the renderer service
bug:149958394

Test: atest android.autofillservice.cts.inline.InlineLoginActivityTest

Change-Id: I4bcdca8188b9b97076c4146f0f9eddffe3e1b3b1
2020-02-21 19:04:00 -08:00
Robin Lee
05b1a38f20 Merge changes from topic "cts_dream"
* changes:
  Create DreamManager System Server TestApi
  Add startDreamActivity request verification
  Make DreamService use an Activity
  Clean up dreamland
2020-02-22 01:06:25 +00:00
Galia Peycheva
4467c53c11 Create DreamManager System Server TestApi
Bug: 141771803
Bug: 133216167

Test: atest DreamManagerServiceTests
Test: make checkbuild

Change-Id: I937061138bc8ccaf4475674f00331c3fe1c5a495
2020-02-21 19:29:05 +00:00
Galia Peycheva
20dc51820a Add startDreamActivity request verification
The ActivityTaskManagerTestService has a special method to start a
DreamActivity. This CL adds a verification check before the activity is
started to check that the caller is the currently active dream
component.

Bug: 133216167

Test: atest DreamManagerServiceTest

Change-Id: Id71b4cbc57c6569f58b6d906cc8361c104a507dc
2020-02-21 10:35:03 +00:00
Galia Peycheva
148478a85e Make DreamService use an Activity
Currently, the DreamService uses a floating Window to display the
content of the dream on the screen. This introduces difficulties in the
interactions with the Assistant application, which is an activity.
By design, if the Assistant is invoked while the device is dreaming, the
Assistant should be shown on top. However, since floating windows are
always drawn on top of all activities, the Assistant can't be shown on
top of the Dream.

Here, we migrate the implementation of the DreamService to use an
Activity (DreamActivity). Since the screensaver application is not part
of the framework, we can't declare the activity in their AndroidManifest.xml.
Therefore, we start the dream activity with a dedicated method in
ActivityTaskManagerService.

Bug: 133216167
Test: 1. m && ./vendor/google/tools/flashall
      2. Go to Settings > Device Preferences > Screensaver > Start now
      3. Verify dream appears
      4. Click any key to wake up the dream
      5. Verify that dream disappears

Change-Id: I8dff0a124cd1b41fb925a73528305431b49ee06d
2020-02-21 05:05:13 +00:00
Fabian Kozynski
d3b621aa56 Merge "Add API for requesting add controls from Provider" 2020-02-20 14:00:48 +00:00
Fabian Kozynski
d6f484027d Add API for requesting add controls from Provider
This API allows ControlsProviderService to request SystemUI to show UI
to the user to add a favorite. This can be called at any time (not just
when bound).

Test: atest
Fixes: 148936288
Change-Id: I8740b6a105ad64994e6df701f2604a4234a49154
2020-02-19 18:11:16 -05:00
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
Galia Peycheva
21cab31b82 Clean up dreamland
Sort imports and exchange inline Runnables for lambdas

Test: m && ./vendor/google/tools/flashall
Change-Id: Ife3d13904a698efbe0933676b176ac1fbb53d0bd
2020-02-14 19:03:58 +01: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