Commit Graph

2295 Commits

Author SHA1 Message Date
Lucas Dupin
888edd6fdc Merge "Implement wallpaper zoom hooking it to the shade" into rvc-dev 2020-03-12 04:07:51 +00:00
TreeHugger Robot
27c83fce04 Merge "add permission requirement for java writeData method" into rvc-dev 2020-03-11 21:49:27 +00:00
TreeHugger Robot
f5589a71e0 Merge "Temporary fix to disable augmented autofill requests coming from password fields." into rvc-dev 2020-03-11 21:43:58 +00:00
Galia Peycheva
444bfa05ec Merge "Remove @UnsupportedAppUsage from DreamService.setWindowless" into rvc-dev 2020-03-11 16:05:36 +00:00
Galia Peycheva
a81d7de0a0 Remove @UnsupportedAppUsage from DreamService.setWindowless
setWindowless is a hidden API since 2014 and was marked
@UnsupportedAppUsage in 2018. It is not known to be used anywhere as
reported by go/nonsdk-dash. This CL removes the @UnsupportedAppUsage.

Bug: 151221085

Test: m

Change-Id: Ic95a2d9da4eb9f4abeba75a35ebe1f8921fb2416
2020-03-11 15:55:17 +00:00
TreeHugger Robot
98f21c2474 Merge "Revert "Revert "Notification statsd logs: Notification panel.""" into rvc-dev 2020-03-10 20:09:43 +00:00
Lucas Dupin
13f4b8a158 Implement wallpaper zoom hooking it to the shade
This adds a notion of per caller wallpaper zoom, in order to support
simultaneous clients.

The shade might be pulled down while in overview, for example, and we
must coordinate between launcher and systemui.

Bug: 149792636
Bug: 146387434
Test: atest NotificationShadeWindowViewTest
Test: atest WallpaperControllerTests
Test: manual
Change-Id: I588ba56d3d2704845d033ea2a5890ce812b9ee07
2020-03-10 10:52:28 -07:00
Adam He
ef0fe20852 Temporary fix to disable augmented autofill requests coming from
password fields.

Bug: 141703197
Test: atest android.autofillservice.cts.augmented
Change-Id: I05330988899a4c21d69c655a39c29fd0fea298c3
2020-03-10 10:47:09 -07:00
Songchun Fan
a2ef115c0f add permission requirement for java writeData method
Write data to an installation file requires INSTALL_PACKAGES permission.

Test: builds
BUG: 149299379
Change-Id: I8e6d6681cc26b748375cc1a0569033a18c3bb670
2020-03-10 10:00:09 -07:00
Yara Hassan
4a4e1e45d0 Merge "Added @IntDef for DATA_SHARE_ERROR_ constants" into rvc-dev 2020-03-10 11:04:12 +00:00
Feng Cao
88872971a7 Create InlineAction class to wrap the IntentSender and the presentation
* Before this change, we were putting the action intent in the Slice,
  but we realize that's not the best place as slice is only meant for
  data representation, and intent does not fall into that
* This patch includes the code to actually fire the pending intent when
  action suggestion is clicked. However, it'll only work if the fill
  service have the SYSTEM_ALERT_WINDOW permission for the intent to
  be fired when it is in the background. We will move it to be fired
  from the client foreground app in a separate patch

Test: manual verification
Test: atest android.autofillservice.cts.inline
Bug: 150499490

Change-Id: I411a7ee05e783f7de94a54064c44a6126afe0b12
2020-03-09 17:32:31 -07:00
TreeHugger Robot
3a68e2d0de Merge "Change setter methods in the FillResponse builder to @NonNull" into rvc-dev 2020-03-09 22:12:30 +00:00
TreeHugger Robot
941e815aab Merge changes I696e3c5d,Iea7a5610,If627e613 into rvc-dev
* changes:
  update javadoc for InstallationFile
  fix error message
  remove incremental.check_loader
2020-03-09 21:47:43 +00:00
Feng Cao
a355711adc Change setter methods in the FillResponse builder to @NonNull
* This is to incorporate the API council feedback at b/148107416
* This is made possible by the new DataClass codegen version 15

Test: build
Bug: 148107416

Change-Id: I8adaf45a64bc08e73988d61fba56430f2b49f747
2020-03-09 13:22:45 -07:00
Matt Pietal
fec10faf52 Controls - Remove support for mock
Not needed any longer

Bug: 151068458
Test: manual
Change-Id: I29efe09b759a82c64fcb8f0d2d48bbf54aee4396
2020-03-09 14:42:46 -04:00
Yara Hassan
e41b29ec57 Added @IntDef for DATA_SHARE_ERROR_ constants
Bug: 150844071
Fix: 150844071
Test: NA
Change-Id: I853f10addf5b2f104ce04503aa033e7a8609d4b3
2020-03-09 18:35:59 +00:00
Songchun Fan
41f451bb5c fix error message
Test: n/a
BUG: 150892197
Change-Id: Iea7a5610849ccc53fb4a100f027feba4871ea61e
2020-03-09 08:55:27 -07:00
Matt Pietal
8ebe5c222d Merge "Control API review changes" into rvc-dev 2020-03-06 19:55:03 +00:00
Will Brockman
492b381224 Revert "Revert "Notification statsd logs: Notification panel.""
This reverts commit 3cc20a4ed8, which
reverted the original change.

Reason for revert: Roll-forward with corrections and additional testing.

Test: atest NotificationLoggerTest SystemUITests
Test: statsd_testdrive 245
Test: adb shell cmd stats print-logs && adb logcat -s statsd:I | grep ' (245)'
Test: manually pull down notification shade
Bug: 146488473
Change-Id: Ifd766dddf869e1e345bf93e950ebb30b149c72c0
2020-03-06 11:38:51 -05: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