Commit Graph

2277 Commits

Author SHA1 Message Date
Matt Pietal
8ebe5c222d Merge "Control API review changes" into rvc-dev 2020-03-06 19:55:03 +00:00
Fabian Kozynski
95dcd2444b Control API review changes
* Add documentation to Device types
* Replace singletons in ControlAction and ControlTemplate to getter
static functions.
* Add javadoc for MODES and FLAG_MODE in TemperatureControlTemplate.
* Removed ThumbnailTemplate instead of updated javadocs. Determined
not necessary anymore
* Remove MultiFloatAction - no longer needed
* Removed reliant sysui code

Bug: 150630500
Test: atest ControlTemplateTest ControlActionTest
Change-Id: Ic4f60c789ce959205137944380e78622d76581a4
2020-03-06 11:15:24 -05:00
Matt Pietal
cd47696a59 Controls API - Add support for routines
Apps can support the idea of a routine. Routines tie together multiple
actions across multiple controls to support everyday tasks that would
otherwise require multiple clicks.

Bug: 150869263
Test: atest ControlProviderTest
Change-Id: I3ee2c87c6130420032ebe407b2ffc1e3e8c1504f
2020-03-05 15:03:08 -05:00
Songchun Fan
ecd96c2be4 Merge "make IDataLoaderManager and IDataLoader stable interfaces" into rvc-dev 2020-03-04 22:53:12 +00:00
Zim
71fcf13cf2 Replace String for 'path' to File
This addresses API review feedback

Bug: 150685654
Test: m
Change-Id: I45d6eb1fc02272e4e4fd729b6535a950aefe8f20
2020-03-04 15:38:48 +00:00
Songchun Fan
6381d6193e make IDataLoaderManager and IDataLoader stable interfaces
Instead of using Bundle, explicitly specify params when initializing a data loader.

BUG: 150406132
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I2f89d3c3ea1058fdbd689da0d5cb801bf4d9a0b4
2020-03-03 21:18:30 -08:00
Vadim Caen
b46f9233ea Compute Wallpaper scaling on the server
Image wallpaper uses DisplayInfo to compute the wallpaper scaling.
When the wallpaper has a fixed rotation transform, its DisplayInfo do
not correspond to its transformed bounds.

We can't use the Configuration's bounds either because the wallpaper
token is created on the server side and we do not have a way to
propagate the changed configuration to a token created from the server.

Bug: 148000485
Test: atest WallpaperControllerTests#testWallpaperSizeWithFixedTransform

Change-Id: Ie80592ae868c980faddece17b94cd34178b1de0e
(cherry picked from commit f79baeaa20)
2020-03-03 16:36:44 +00:00
TYM Tsai
b1f42dd78a Uses SurfacePackage instead of SurfaceControl on inline suggestion
The InlineContentView uses the SurfacePackage instead of the SurfaceControl
for accessibility and UiAutomation supporting.

Bug: 149194105
Test: manual
Change-Id: Ib10f37a58dde7dc09d0ea16d1a121088dab4738e
2020-03-02 20:51:46 +08:00
TreeHugger Robot
0fe12dad61 Merge "Several improvements and bug fixes to the inline autofill flow" into rvc-dev 2020-02-29 01:35:19 +00:00
Feng Cao
ec496000ec Several improvements and bug fixes to the inline autofill flow
* Pipe the augmented autofill's inline actions through to the
  InlineSuggestionsResponse
* Do not send the inline action if the number of inline suggestions is
  zero
* Refactor autofill inline suggstion session so that all the calls to
  the IME has happens within the class
* Send an empty response to IME to hide the inline suggestion UI  when
  view exits and the previous response wasn't empty

Test: manual verification, atest InlineLoginActivityTest
Bug: 149522488
Bug: 150312201

Change-Id: I7a0dbf44e9fad6e7da857448c0f2b186e1681d17
2020-02-28 17:25:30 -08:00
Matt Pietal
e4beb133e6 Merge changes I7ac3a378,Id06a24d2 into rvc-dev
* changes:
  Controls API - Docs + method name change
  Controls API - Publisher change - Phase 2
2020-02-28 19:06:28 +00:00
Julia Reynolds
138111fca3 Show snoozed conversations in conversation header
- And allow them to be unsnoozed with a tap.
- Also use the conversation's shortcut icon and name if available.
- And ignore the setting to turn off the strips since it now requires
explicit user action to make the strip visible

Note 1: unsnoozing a notification causes it to make sound again - we
probably want to change that for manually unsnoozed things
Note 2: the entries in the header don't yet persist across a reboot

Test: atest, manual
Bug: 149486431
Change-Id: Id661c25a49bc982e39deab977eb912f51eaf6757
2020-02-28 02:48:07 +00:00
Nicholas Ambur
626b24958f Merge "remove client token passing active VI service" into rvc-dev 2020-02-27 18:01:24 +00:00
TreeHugger Robot
8e5e4e03a9 Merge "Hide CarrierMessagingServiceWrapper for now." into rvc-dev 2020-02-27 04:04:35 +00:00
TreeHugger Robot
658fc6d6d6 Merge "A few inline autofill API tweaks." into rvc-dev 2020-02-27 03:16:38 +00:00
Amit Mahajan
e75a35d3b3 Hide CarrierMessagingServiceWrapper for now.
Based on api-council feedback there are some changes required.
Will incorporate the changes and expose this class in a later
release.

Test: basic sanity
Bug: 144346062
Change-Id: Icb65f90261ea6000aecd72a1888d5ee23eed6527
2020-02-26 23:02:44 +00:00
Feng Cao
4b0ef392c2 A few inline autofill API tweaks.
* add isPinned() to InlineSuggestionInfo so IME can choose to pin the suggestion
* allow augmented autofill service to set inline actions in the response
* non-api change: pull the autofill hints from the Slice in the InlinePresentation

Test: m -j; atest InlinePresentationTest, atest CtsInputMethodTestCases:InlineSuggestionInfoTest CtsInputMethodTestCases:InlineSuggestionTest
Bug: 137800469

Change-Id: I63b6b843ef056df18c317299e617b8fe21907374
2020-02-26 13:49:54 -08:00
Matt Pietal
e44217b31a Controls API - Docs + method name change
Updated javadoc for service interface. Changed method names to include
a verb.

Bug: 150154816
Test: atest ControlProviderServiceTest
Change-Id: I7ac3a378695c8f90a22ff9266d15163140aab432
2020-02-26 15:49:37 -05:00
Matt Pietal
bb3be6517c Controls API - Publisher change - Phase 2
Complete the removal of consumer-based load API method. Update the
publisher-based 'publisherForAllAvailable()' to be non-null and
abstract, indicating it is now a required method.

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

Change-Id: Id06a24d2facf7621e8985ebe0396092752b6f59d
2020-02-26 15:46:10 -05:00
Fabian Kozynski
0b66590fbf Merge "Add docs to Controls API" into rvc-dev 2020-02-26 20:21:53 +00:00
TreeHugger Robot
214fe98184 Merge "Use display context all the way" into rvc-dev 2020-02-26 19:02:34 +00:00
Fabian Kozynski
9f2dabf255 Add docs to Controls API
Test: build
Bug: 150154816
Change-Id: Ie1f77620f8302032845ae1f66459b2990513bb86
2020-02-26 09:56:44 -05:00
Jerry Chang
30efde6a30 Prevent NPE whlie leaving windowless dream service.
There might having windowless dream service like doze dream which won't
hava attached activity, so call finish() directly in onWakeUp() since
finish() itself deals with finishAndRemoveTask() as well.

Fix: b/150110220
Test: manual test, won't throw NPE while leaving doze service.
Change-Id: I982c2f6fb1859e869732ef8795b61bf96e8cff64
Merged-In: I982c2f6fb1859e869732ef8795b61bf96e8cff64
(cherry picked from commit 45f0d572c1)
2020-02-26 10:56:29 +00:00
Svet Ganov
17a647eee0 Use display context all the way
Bug: 149958394
Test: core/java/android/service/autofill/InlineSuggestionRenderService.java

Change-Id: I15c3149dfe37adef95ffd47454975761d6e624f0
(cherry picked from commit 8cdf9ebc5c)
2020-02-25 20:07:31 +00:00
Julia Reynolds
36ff1ea03f Add owners file
Fixes: 150217454

Change-Id: I80e624dd3de150cbf1cf50465cadb676256a4063
2020-02-25 18:54:36 +00:00
Galia Peycheva
641e2e6361 Create DreamManager System Server TestApi
Bug: 141771803
Bug: 133216167

Test: atest DreamManagerServiceTests
Test: make checkbuild

Merged-In: I937061138bc8ccaf4475674f00331c3fe1c5a495
Change-Id: I937061138bc8ccaf4475674f00331c3fe1c5a495
(cherry picked from commit 4467c53c11)
2020-02-25 12:32:02 +00:00
Galia Peycheva
a72d7e53e6 Merge changes Id71b4cbc,I8dff0a12,Ife3d1390 into rvc-dev
* changes:
  Add startDreamActivity request verification
  Make DreamService use an Activity
  Clean up dreamland
2020-02-25 10:11:21 +00:00
Galia Peycheva
52e8922e8a 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

Merged-In: Id71b4cbc57c6569f58b6d906cc8361c104a507dc
Change-Id: Id71b4cbc57c6569f58b6d906cc8361c104a507dc
(cherry picked from commit 20dc51820a)
2020-02-25 07:57:09 +00:00
Galia Peycheva
6861e91b84 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

Merged-In: I8dff0a124cd1b41fb925a73528305431b49ee06d
Change-Id: I8dff0a124cd1b41fb925a73528305431b49ee06d
(cherry picked from commit 148478a85e)
2020-02-25 07:56:28 +00:00
Alex Mang
799b7deb72 Clarifying meaning of items param in javadoc per feedback
Bug: 148402958
Change-Id: Ic021f6fc37e7fce8e9b052d7434d0dc1569724ea
Merged-In: Ic021f6fc37e7fce8e9b052d7434d0dc1569724ea
(cherry picked from commit fa1062ac43)
2020-02-25 01:21:08 +00:00
Nicholas Ambur
1ec50c8f2f 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

Merged-In: Ie2c4653d365770a9123a22bc69822518b4ccc568
Change-Id: Ie2c4653d365770a9123a22bc69822518b4ccc568
(cherry picked from commit c6f4118f9e)
2020-02-25 01:20:05 +00:00
Galia Peycheva
a8e4641296 Clean up dreamland
Sort imports and exchange inline Runnables for lambdas

Bug: 133216167
Test: m && ./vendor/google/tools/flashall
Merged-In: Ife3d13904a698efbe0933676b176ac1fbb53d0bd
Change-Id: Ife3d13904a698efbe0933676b176ac1fbb53d0bd
(cherry picked from commit 21cab31b82)
2020-02-24 19:04:25 +00:00
Svet Ganov
02fdd34057 Use context for correct display in the renderer service
bug:149958394

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

Change-Id: I4bcdca8188b9b97076c4146f0f9eddffe3e1b3b1
(cherry picked from commit 2aa4f10996)
2020-02-22 19:54:59 +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
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