Commit Graph

2532 Commits

Author SHA1 Message Date
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
Feng Cao
08abd46f61 Make autofill requested by augmented autofill service non-manual
* The use case of this API was for augmented autofill service to send
  updated suggestions
* Before this change, the dynamic autofill request by the augmented
  autofill service only triggers a manual request, but this has caused
  some regular autofill providers to always some suggestion due to
  their special handling for the manual request. Thus the augmented
  autofill service will not receive the request.
* With this cahnge, the request cancels the previous session to start a
  new session, and also it triggers a regular request (non-manual) so
  the autofill provider will not special handle the request.

Test: atest CtsAutoFillServiceTestCases
Bug: 154543563

Change-Id: I233125a6070394a102ad40b9a50b98a43d952b9f
2020-05-04 11:36:21 -07:00
Andrew Sapperstein
6fd486eeec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec
Change-Id: I40f61d6aefe3e9dd74901513c4638159d8b44ecf
2020-05-02 00:29:38 +00:00
Andrew Sapperstein
975ca816ec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-02 00:21:33 +00:00
Feng Cao
3a7f16b1d1 Merge "Support receiving touch event in the inline suggestion view" into rvc-dev am: 4e20f2b97c am: 7783a9a800 am: 2c0f518084 am: b462d37a0f
Change-Id: I9ed24e99cc862a739cef76d6614a54491305ed9d
2020-05-01 23:19:52 +00:00
Feng Cao
7783a9a800 Merge "Support receiving touch event in the inline suggestion view" into rvc-dev am: 4e20f2b97c
Change-Id: Ie6a8e6bc395f5d709d7191d6616eab069f7a352c
2020-05-01 22:23:46 +00:00
Feng Cao
4e20f2b97c Merge "Support receiving touch event in the inline suggestion view" into rvc-dev 2020-05-01 22:07:39 +00:00
Feng Cao
c23bfc7819 Support receiving touch event in the inline suggestion view
* Before this change, the suggestionRoot would intercept all touch
  events so that it can optionally forward them to the IME process
  to support scrolling, no touch event will be sent to the child
  view through the regular event dispatching process.
* With this change, we move the touch event transferring (to IME)
  logic from SuggestionRoot's onTouchEvent to dispatchTouchEvent.
  Now the touch events before a scroll is detected will be sent to
  the child chip view, and only the touch events after a scroll is
  detected will be sent to the IME.
* This patch also move the OnClickListener and OnLongClickListener
  from the root view to the chip view, since the touch events now
  either goes to the chip view or to the IME process.
* Note that in order to achieve this, given that we can't change
  the API, and there is existing OnLongClickListener registered
  to the chip view, we have to add a @hide API to the View to
  get the existing OnLongClickListener and attach a new one to the
  chip view, such that we can do the additional work of sending
  the long click event to IME, when the view is long clicked.
* This patch should also fix the a11y talkback mode bug where
  double-tapping on the view doesn't autofill the value.
  Double-tap and hold also works that it triggers the attribution
  dialog.

Test: atest CtsAutoFillServiceTestCases (sanity test)
Bug: 155245913
Bug: 154149807

Change-Id: I6f7be1ea5c0955969abb4ccae0cb421423095c4d
2020-05-01 12:36:51 -07:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
a296471054 Merge "Update inner class constructor refs to use proper syntax." 2020-05-01 18:00:05 +00:00
Abodunrinwa Toki
143b8a9762 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e am: 5eb7265785 am: e076eb2584
Change-Id: I1781f9427954eebd5226ae7cea3170c96fe4de5c
2020-05-01 11:53:18 +00:00
Abodunrinwa Toki
f58bd41b0e Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde
Change-Id: I303a573a48661c9d222def2b46501ad1d81ab23c
2020-05-01 11:02:12 +00:00
Abodunrinwa Toki
1cf3ce8fde Merge "Rewrite Icons from the TCS." into rvc-dev 2020-05-01 10:52:43 +00:00
Andrew Sapperstein
4c4aa41272 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
2020-04-29 13:16:02 -07:00
TreeHugger Robot
3475af8bca Merge "Use POWER_MENU_LOCKED_SHOW_CONTENT in wallet" into rvc-dev am: 2b49f81e7e am: 6fd18c094a am: d6cd810b72 am: 4d9f934d0f
Change-Id: I0d62d549753be9f33e7014c6b24894fa05352a3c
2020-04-29 19:22:09 +00:00
TreeHugger Robot
d6cd810b72 Merge "Use POWER_MENU_LOCKED_SHOW_CONTENT in wallet" into rvc-dev am: 2b49f81e7e am: 6fd18c094a
Change-Id: Iff82f370ba9549931be736fb307ab6b430170454
2020-04-29 18:40:49 +00:00
TreeHugger Robot
a300892263 Merge "Use POWER_MENU_LOCKED_SHOW_CONTENT in wallet" into rvc-dev am: 2b49f81e7e
Change-Id: I2819f1cad110b5aa96eab1a87a5212f08c5cae87
2020-04-29 18:36:43 +00:00