Commit Graph

2548 Commits

Author SHA1 Message Date
TreeHugger Robot
a750baf8eb Merge "Controls UI - Tap for NO_TEMPLATE" into rvc-dev am: d6fb5e2151 am: df58dcf081 am: c3d1ff26ef am: 2a0a156fe7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11850954

Change-Id: Ifba560b04ad451622ffe831fdc7259db6330e6bb
2020-06-12 18:08:28 +00:00
TreeHugger Robot
df58dcf081 Merge "Controls UI - Tap for NO_TEMPLATE" into rvc-dev am: d6fb5e2151
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11850954

Change-Id: I13e5ed74ac82b79a7b72511b55c02cb6ad4c6573
2020-06-12 17:22:24 +00:00
Matt Pietal
733d637879 Controls UI - Tap for NO_TEMPLATE
Allow single taps as well as long press to launch the detail panel
when no template is specified.

Fixes: 158773087
Test: ControlsMockApp, any default type
Change-Id: I4d5451f6a5968d8dd223eb5b10d931ad60aad951
2020-06-12 11:59:57 -04:00
Automerger Merge Worker
c43c57ac2b Merge "Merge "Send empty inline response to IME if augmented autofill returns no suggestion" into rvc-dev am: b9aeb6ca22 am: b205b806f1" into rvc-d1-dev-plus-aosp am: b6d6e164dd am: 438b33bfbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784240

Change-Id: I77c57452d790974aac7f52a74f63f924ec9de2bb
2020-06-10 22:38:24 +00:00
TreeHugger Robot
b205b806f1 Merge "Send empty inline response to IME if augmented autofill returns no suggestion" into rvc-dev am: b9aeb6ca22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784240

Change-Id: I9f4359377b1ab3866e8fc530a5dc67020e5363a2
2020-06-10 21:59:48 +00:00
TreeHugger Robot
b9aeb6ca22 Merge "Send empty inline response to IME if augmented autofill returns no suggestion" into rvc-dev 2020-06-10 21:56:03 +00:00
TreeHugger Robot
a987574098 Merge "pulled atom for Do Not Disturb configuration" into rvc-dev am: 5599ca731f am: 6f629d1629 am: 873e2b6ac1 am: 0027dd9266
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11494623

Change-Id: I77ed9bb47d74e49f8b6104bbef193087883a2586
2020-06-10 03:40:50 +00:00
TreeHugger Robot
6f629d1629 Merge "pulled atom for Do Not Disturb configuration" into rvc-dev am: 5599ca731f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11494623

Change-Id: Ia2a6641039579516452b2b200b6fbab809e4d885
2020-06-10 02:48:38 +00:00
Chris Wren
9316569062 pulled atom for Do Not Disturb configuration
Bug: 154254547
Test: atest ZenModeHelperTest ZenModeConfigTest ZenPoicyTest
Change-Id: Ibfcf0f8034b049b1ec790d243e8cb06d71224063
2020-06-09 20:17:10 -04:00
Feng Cao
1e0e1238e0 Send empty inline response to IME if augmented autofill returns no suggestion
* The augmented autofill may dynamically request an autofill request
  which will "invalidate" the old suggestions. In case the new request
  doesn't return any suggestions, we need to make sure the old
  suggestions are removed from the IME.
* See the scenario in https://b.corp.google.com/issues/158038231#comment14

Test: manual
Test: atest android.autofillservice.cts.inline
Bug: 157515522
Bug: 158038231

Change-Id: If85592395ad918197566a5ca556fba8ccc971071
2020-06-07 16:17:40 -07:00
Matt Pietal
be9ba0f51a Merge "Controls UI - Handle 'not found' better" into rvc-dev am: 8761fbb501 am: 3c731d4928 am: cc19753128 am: cde15acb3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11738038

Change-Id: I3b72ac4a150a2b7b2d7ea4b665574bb410d26d9e
2020-06-05 00:17:04 +00:00
Matt Pietal
3c731d4928 Merge "Controls UI - Handle 'not found' better" into rvc-dev am: 8761fbb501
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11738038

Change-Id: I97687ddc6194d0e76313e6935cfec9920f4492ce
2020-06-04 23:32:59 +00:00
Matt Pietal
370db8771d Controls UI - Handle 'not found' better
Show a more informative error to the user on touch/long press about
how to handle this situation. Properly animate status changes.

Fixes: 154737944
Test: TYPE_DISPLAY in mock app simulates not found error
Change-Id: I15ce2d2621ea29c97936f9d9022d917637693288
2020-06-04 17:20:42 -04:00
TreeHugger Robot
79625c390a Merge "Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured" into rvc-dev am: 931c0ce463 am: 5c14c53394 am: 44150e95f3 am: 44d367fccb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11712623

Change-Id: I1c971e56e649b29ef340dd59ac179abe0984edff
2020-06-03 18:19:33 +00:00
TreeHugger Robot
5c14c53394 Merge "Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured" into rvc-dev am: 931c0ce463
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11712623

Change-Id: I2f5d69c14649e80c870d43f731badd7442d8dffb
2020-06-03 17:44:17 +00:00
Feng Cao
2db11209c6 Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured
* if the user taps quickly such that there is only ACTION_DOWN and
  ACTION_UP, without ACTION_MOVE, it'd be possible that the
  isSecure check is not  respected. This patch fixes that case.

Test: atest android.autofillservice.cts.inline
Bug: 157772682
Bug: 158038231

Change-Id: Icd21bf2f88259673bb9b20e46e63672648495eac
2020-06-02 22:08:11 -07:00
Zimuzo Ezeozue
5fd1767ab1 Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e am: d371efcfb2 am: 46ca9f3ddd am: b8dd27d216
Original change: undetermined

Change-Id: I7b34b29c6cef114420491bb1710f240e38b3981d
2020-06-02 11:37:20 +00:00
Zimuzo Ezeozue
d371efcfb2 Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e
Original change: undetermined

Change-Id: I82ce2d45bc194420d34866483b5b1af06f27563c
2020-06-02 10:49:53 +00:00
Zimuzo Ezeozue
efbc3f2d5e Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev 2020-06-02 10:45:33 +00:00
Zim
c7496a3a62 Support apps sharing file:// URIs with the camera API
The camera API, MediaStore.ACTION_IMAGE_CAPTURE requires apps to pass
a content:// URI with write permissions to the camera. Unfortunately,
apps haven't been doing this and we only started hitting problems in R
for two reasons:
1. The FileUriExposedException that should crash apps when they try to
share file:// URIs acroos binder is skipped. This is because, the
image_capture intent is passed across binder as a field in a
ChooserActivity Intent and the child intents are not checked for
file URI exposed
2. Prior to R, when camera gets a file:// URI, camera issues a file
open(2) in its process. This open(2) succeeds because the camera had
write_external_storage permission which gave it write access to all
files on external storage

Now, camera targets R and (2) fails because camera does not have write
access to files owned by other apps. To workaround, we do the
following in the apps process when it targets < R:
a. When we detect a file:// URI for the camera in an Intent, we create
the file on disk if it is not already created.
b. Scan the file to insert it in the database and retrieve a
content:// URI
c. Replace the file:// URI with the content URI in the image_capture
intent

This works because, the system will ensure the camera is granted write
access to the content URI.

Test: Manual
Bug: 156336269
Change-Id: I4849ff5e806a8207650ff7534846c36ecdc6d3c0
2020-06-01 20:33:52 +01:00
Yara Hassan
297394e38d Add finish() method to DataShare Read and Write Adapters am: dc699fb8ce am: 6dd5caab66 am: feece5dae2 am: 8e07922b64
Change-Id: I4fd5540ecaf56afae4289bd9010ebbbfb5389875
2020-05-30 00:37:01 +00:00
Yara Hassan
6dd5caab66 Add finish() method to DataShare Read and Write Adapters am: dc699fb8ce
Change-Id: I747217a8f7808a9dec4d5fb03daeeaec0bc107a8
2020-05-29 23:50:57 +00:00
Yara Hassan
dc699fb8ce Add finish() method to DataShare Read and Write Adapters
The finish() method is used to clear hard references after
the data copy has ended. This fixes a bug where the references are cleared before onError() is attempted to be called.

Test: CTS tests in followup CL
Bug: 157136368
Fixes: 157136368
Change-Id: If924fe388762831af90579e6b00bdf223230e203
2020-05-29 14:35:13 -07:00
TreeHugger Robot
d26e6a0111 Merge changes from topic "controls_config" into rvc-dev am: 61d46be2c2 am: 181c47ad64 am: 5bcd7a857b am: eb85ebb7a6
Change-Id: I1b76066bda0db8c0ae750a9ec91afe2888494b87
2020-05-29 18:30:21 +00:00
TreeHugger Robot
181c47ad64 Merge changes from topic "controls_config" into rvc-dev am: 61d46be2c2
Change-Id: Ifcba3a0e09e93748dfcad14d1baaab20d430885f
2020-05-29 18:14:50 +00:00
Matt Pietal
1f7c8174f0 Controls UI - Support seeding for up to 6 structures
Limit to 36 controls: 6 structures with up to 6 controls per structure

Fixes: 153606605
Test: atest ControlsControllerImplTest

Change-Id: Ieddceda4a0902e4b42208680c7a77ee03514a16c
2020-05-29 08:15:35 -04:00
TreeHugger Robot
8ab975d0c7 Merge "Fix cts fail for android.autofillservice.cts.augmented" into rvc-dev am: a76f65614e
Change-Id: I6ec351ebd408e791bb67e43c996fb9af8202e185
2020-05-12 20:33:15 +00:00
TreeHugger Robot
4f434f1e82 Merge "Fix cts fail for android.autofillservice.cts.augmented" into rvc-dev am: a76f65614e am: 8e04eab6fd am: 52b512a027 am: 81c09c975f
Change-Id: I308eebac4806c6bb78fb50ac15e5b26da43304d4
2020-05-12 18:49:37 +00:00
TreeHugger Robot
52b512a027 Merge "Fix cts fail for android.autofillservice.cts.augmented" into rvc-dev am: a76f65614e am: 8e04eab6fd
Change-Id: I95e020d7696c626d169933f8a2e25ecb4e3563a8
2020-05-12 17:52:31 +00:00
lpeter
8e815316dd Fix cts fail for android.autofillservice.cts.augmented
In the test we trigger the manual autofill request programmatically,
because the focus isn't on the field, we will not get the callback
from IME.
It would be better not to ask IME for inline request if the request
is manual and the view is not focused because it's a simpler/safer
approach and manual request without focus should be rare.

Bug: 154661868
Test: atest CtsAutoFillServiceTestCases
Change-Id: I783b2542094cdea547ebd58ce89f30d9cd421708
2020-05-12 13:47:54 +00:00
Feng Cao
571fa86530 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev am: 254545cae5 am: f9748230fd am: 35c8ea2a8b am: 9c116694b4
Change-Id: Ic8bdf26c2194d779d9d313d8cfb30b65857064c4
2020-05-07 06:15:23 +00:00
Feng Cao
c2f8606e32 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev am: 254545cae5 am: 03f9fbbf3d
Change-Id: I8b638d30584965de95819a8cd71d0621c7060cf1
2020-05-07 05:38:22 +00:00
Feng Cao
f9748230fd Merge "Support re-attaching the inline suggestion view to window" into rvc-dev am: 254545cae5
Change-Id: I7a7655f90cdbf924635d6bcd48898fbd22aec1eb
2020-05-07 05:28:51 +00:00
Riddle Hsu
29c9df03e2 Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev am: b76f9472df am: 10662e54cc am: c6c8c58fa2 am: e18411cbf0
Change-Id: I3220c7719ff2bb274584c6e1ad8a9f89699ec7c7
2020-05-07 05:23:45 +00:00
Feng Cao
254545cae5 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev 2020-05-07 05:23:15 +00:00
Riddle Hsu
c6c8c58fa2 Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev am: b76f9472df am: 10662e54cc
Change-Id: I8c89cbf67d648878c71c92574ce89090fc2de6bd
2020-05-07 04:59:50 +00:00
Riddle Hsu
4dfd3dcd3a Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev am: b76f9472df
Change-Id: I5d0b57b38d31f6f466ef1ecf1b63b5e3a98248de
2020-05-07 04:59:11 +00:00
Riddle Hsu
b76f9472df Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev 2020-05-07 04:51:38 +00:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Galia Peycheva
d8a36ac81c Merge "Override DreamActivity enter and exit animations" into rvc-dev am: 1255a2d20b am: ca823fb574 am: 060444d9ce am: bc7e2eb369
Change-Id: I68808bce07f37393c43f38ba79c1a59e54299f4a
2020-05-06 21:35:33 +00:00
Galia Peycheva
ca823fb574 Merge "Override DreamActivity enter and exit animations" into rvc-dev am: 1255a2d20b
Change-Id: I97d1d9f9e45c1430b02907a29f8cfc1a7fca4c1f
2020-05-06 20:46:39 +00:00
Galia Peycheva
1255a2d20b Merge "Override DreamActivity enter and exit animations" into rvc-dev 2020-05-06 20:30:21 +00:00
Riddle Hsu
d948f743c2 Do not stop dream service if dream activity is relaunching
Currently DreamActivity doesn't handle any configuration changes,
and does not set fixed orientation. So the decor view will be
detached if the activity is relaunching for configuration changes.

Though it also works by making DreamActivity support handling the
changes, all implementations of DreamService may need to add the
corresponding handling. So this fix only keeps the service alive
for compatibility.

Fixes: 154474768
Test: atest DreamManagerServiceTests#testDreamNotFinishAfterRotation
Test: Enter Settings > Display > Screen saver, press "Start now".
      The dream service should not be stopped after device rotated.
Change-Id: I454f75d06c4539258eeafd8794a3cb03e0276163
2020-05-06 12:26:13 +00:00
Galia Peycheva
3cf3520d3f Override DreamActivity enter and exit animations
Fix: 153151516

Test: atest DreamManagerServiceTests
Change-Id: I4ba741512edea23e0209b176a34478045931c891
2020-05-06 10:30:27 +02:00
Andrew Solovay
c2aaa2bb79 Merge "docs: Fixing broken Javadoc comments" into rvc-dev am: 9e2fa5042b am: 3839f1f669 am: 8ef5792ef0 am: ee5c2d45d6
Change-Id: Ib481085d1cda38b9d63bdc0a849ad904b68efc40
2020-05-05 21:48:45 +00:00
Andrew Solovay
3839f1f669 Merge "docs: Fixing broken Javadoc comments" into rvc-dev am: 9e2fa5042b
Change-Id: I126eb315f245c806829c3ea3bc3af199d9a3aecf
2020-05-05 21:10:16 +00:00
Andrew Solovay
369f2eeaf9 docs: Fixing broken Javadoc comments
Two recent checkins broke the Javadoc (in both cases, an <h3> wasn't
properly closed). Made the fix by hand to the HTML output in
cl/309818465 but we need to make the corresponding change to
the Java source or it'll get reverted next time we update the reference
docs.

Staged to:

go/dac-stage/reference/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/android/service/autofill/AutofillService

go/dac-stage/reference/kotlin/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/kotlin/android/service/autofill/AutofillService

BUG: 155669442
Exempt-from-owner-approval: Docs-only change
Test: make ds-docs
Change-Id: I97be9550689544304dff276cf3c9406f9cd98408
2020-05-04 16:03:17 -07:00
Feng Cao
c357f974e4 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev am: 98367aef11 am: 3767c8db8c am: 1eedaf79f3 am: 415c282d00 am: 832dd66790
Change-Id: I2233cbf918988c5bdc54278c67a05c19d97f2f0e
2020-05-04 20:51:39 +00:00
Feng Cao
3767c8db8c Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev am: 98367aef11
Change-Id: I6b08fe0719dd6436f03a3443b8c98c1d9635bfeb
2020-05-04 20:35:00 +00:00
Feng Cao
98367aef11 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev 2020-05-04 20:30:01 +00:00