Nikita Dubrovsky
10646dff7e
OnReceiveContentListener: Handle IME insertion permissions release
...
For content insertion from the IME, the platform currently assumes
that it can automatically revoke URI permissions (via
InputContentUriTokenHandler.finalize) any time after the
InputContentInfo instance is garbage collected and
InputContentInfo.releasePermission() has not been called explicitly.
This can cause permissions to be revoked before the receiving code
has had a chance to read the content when using
OnReceiveContentListener, since we did not keep a reference to
InputContentInfo.
This change does the following:
* Sets the InputContentInfo instance in the ContentInfo payload passed
to OnReceiveContentListener.
* Exposes a hidden API on ContentInfo to allow system features to
proactively release permissions for sources that allow this (IME and
drag-and-drop).
* Updates notifications direct-reply code to proactively release
permissions as soon as they are no longer needed.
Bug: 183643556
Test: Manual
Change-Id: I1cbc55d53804810a3cd4b6b97c197f4dd2d7d8e6
2021-03-25 09:37:21 -07:00
Nikita Dubrovsky
4b7b90e791
Integrate OnReceiveContentListener in View.onDragEvent
...
OnReceiveContentListener was already integrated with drag-and-drop
in TextView. The change extends support to all subclasses of View.
If an OnReceiveContentListener is set on the view, the default
implementation of View.onDragEvent will now return true for an
ACTION_DRAG_STARTED event and will call
View.performReceiveContent for an ACTION_DROP event.
Bug: 182617122
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: Manually using ReceiveContentDemo
Change-Id: I98fb703220ebd1953b20dcab60d22847cc5000d8
2021-03-18 13:53:49 -07:00
Nikita Dubrovsky
910746fe96
Update logic for drag-and-drop URI permissions for editable TextViews
...
Previously, Editor.onDrop used a try/finally block to request and
release URI permissions. This doesn't work for the case when an app
sets an OnReceiveContentListener (or subclasses TextView and overrides
the onReceiveContent() method). If using a background thread to
process the content in the custom impl for receiving content,
permissions will be revoked in the finally block before the app has
had a chance to process the URI.
With this change, when Editor requests permissions, they will be bound
to the app process and released automatically when the app process
terminates.
Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I7ae38069fb741925211b42c7ff28784eb9722ce3
2021-03-12 08:08:57 -08:00
Frank Li
3ca8fa18f9
Merge "[CS15]Do not use hidden API of PlatformProperties" into sc-dev
2021-03-11 02:28:49 +00:00
Shubang Lu
f931dcaaa8
Merge "Fix NPE of extras in media metrics" into sc-dev
2021-03-11 02:03:09 +00:00
Arc Wang
39665ed526
Merge "Tweak SettingsSpinner UI" into sc-dev
2021-03-11 01:57:37 +00:00
Prabir Pradhan
110dd15fe2
Merge "Per-window input rotation: Remove projection from DisplayViewport" into sc-dev
2021-03-11 01:40:37 +00:00
Arthur Hung
28b0720cd4
Merge "Move drag event to InputDispatcher (2/n)" into sc-dev
2021-03-11 01:17:38 +00:00
Kevin Chyn
0cdcea8e74
Merge "Add scaling factor for guided enrollment" into sc-dev
2021-03-11 01:14:44 +00:00
Kevin Chyn
9a8cfc21f2
Merge changes from topics "fp-revokeChallenge", "new-revokeChallenge" into sc-dev
...
* changes:
Consolidate FingerprintManager revokeChallenge
Consolidate revokeChallenge methods
2021-03-11 01:14:15 +00:00
Jing Ji
e2a2b618ea
Merge "Validate the ServiceRecord state while handling misbehaving FGS" into sc-dev
2021-03-11 01:12:09 +00:00
Jeff DeCew
269093b8d8
Merge "Fix rules for exempting notifications from the expanded state." into sc-dev
2021-03-11 01:09:20 +00:00
Curtis Belmonte
455eb1271d
Merge "Use different prompt messages for biometric|credential" into sc-dev
2021-03-11 00:43:38 +00:00
George Mount
73046dc2f6
Merge "Use spring animation for stretch overscroll" into sc-dev
2021-03-11 00:43:04 +00:00
Jackal Guo
1bee4b7b6f
Merge "Apply package visibility for apps with shared userId" into sc-dev
2021-03-11 00:42:03 +00:00
Xusong Wang
e2be820dc6
Merge changes from topic "renderscript-deprecation" into sc-dev
...
* changes:
Silence compiler errors because of renderscript deprecation.
Deprecate RS Java APIs.
2021-03-11 00:29:08 +00:00
Kevin Han
70aa412d99
[automerger skipped] Merge "Add local service interface for app hibernation" am: 20414370df am: a74ea0e480 am: 4c0987e7e0 -s ours
...
am skip reason: Change-Id Iad830fa1f380c741674ef257db9d8d7830be6592 with SHA-1 0dac440808 is in history
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624866
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I66fb29bcc722fec39fdd71a6ee4eac62a77bd1cd
2021-03-11 00:00:33 +00:00
Jeff Sharkey
2dc8341507
Merge "Make FileUtils#createDir threadsafe" am: 5232082243 am: bc1b11029b am: 5c1ad2c60d
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I89d4a57963e75c0a6000f1f1a9a266b22e28be94
2021-03-11 00:00:09 +00:00
Benedict Wong
ade9cfe274
Merge changes Iad296830,I826711bb,Ieb2a9b20,I6b688b00 am: 03c0059bb1 am: e57540d009 am: ba918fd6bc
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624741
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Idbed1fc3755b9a0eb4f7d89829b77cd94a2136f4
2021-03-10 23:59:41 +00:00
TreeHugger Robot
0ea6f235c7
Merge "Make two broadcasts protected" into rvc-qpr-dev am: 5fc03a1663 am: 8df4a685df
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13676730
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I125d0c3d5152da5bc8ef2896cf50ad5a6452e818
2021-03-10 23:58:58 +00:00
TreeHugger Robot
b3149adf8b
[automerger skipped] Merge "Include whether in touch mode for WindowlessWindowManager" into rvc-qpr-dev am: 09b7b55659 am: 3d28e460e1 -s ours
...
am skip reason: Change-Id Ice37c3182a44c6284ffa8950996507025c59270b with SHA-1 ded0e32b80 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828717
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1b599caf7c4bbe5666110fbff97ab7b749dd9ff0
2021-03-10 23:57:21 +00:00
Jorge Gil
fa63935a61
Merge "Update PIP menu accessiblity bounds when it is moved" into sc-dev
2021-03-10 23:51:52 +00:00
Beverly Tai
11891c768c
Merge "Don't show toast icon for system apps" into sc-dev
2021-03-10 23:41:10 +00:00
Kevin Han
4c0987e7e0
Merge "Add local service interface for app hibernation" am: 20414370df am: a74ea0e480
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624866
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I05af103b0cbb2b3c8b715988186a7354ba371032
2021-03-10 23:34:53 +00:00
Jeff Sharkey
5c1ad2c60d
Merge "Make FileUtils#createDir threadsafe" am: 5232082243 am: bc1b11029b
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id70ab2f8c4a73d74e6b0e63353e66521bd6c3581
2021-03-10 23:34:36 +00:00
Benedict Wong
ba918fd6bc
Merge changes Iad296830,I826711bb,Ieb2a9b20,I6b688b00 am: 03c0059bb1 am: e57540d009
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624741
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I4f769e2f26a335e767a049916499d86c6c3cff5c
2021-03-10 23:34:20 +00:00
Kevin Han
a74ea0e480
Merge "Add local service interface for app hibernation" am: 20414370df
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624866
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I98839b34ff47b373a646edf3a43b48f5d7f69b4d
2021-03-10 23:17:59 +00:00
TreeHugger Robot
8df4a685df
Merge "Make two broadcasts protected" into rvc-qpr-dev am: 5fc03a1663
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13676730
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I4eb00cfb64bb321e9cd84a2d5e32f3996820fbd8
2021-03-10 23:15:36 +00:00
George Mount
167dea1218
Merge "Compatibility feature USE_STRETCH_EDGE_EFFECT_BY_DEFAULT" into sc-dev
2021-03-10 23:15:21 +00:00
TreeHugger Robot
3d28e460e1
Merge "Include whether in touch mode for WindowlessWindowManager" into rvc-qpr-dev am: 09b7b55659
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828717
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I022ad77f205b88bf7c76b403b93b9f516cf85a20
2021-03-10 23:15:15 +00:00
Victor Hsieh
f4305279e5
Merge "Move VerityUtils from services.jar to core.jar" into sc-dev
2021-03-10 23:10:25 +00:00
Jeff Sharkey
bc1b11029b
Merge "Make FileUtils#createDir threadsafe" am: 5232082243
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6449b55a42994f8c35854bbe698ad2c697ab0244
2021-03-10 23:06:15 +00:00
TreeHugger Robot
5fc03a1663
Merge "Make two broadcasts protected" into rvc-qpr-dev
2021-03-10 23:00:30 +00:00
TreeHugger Robot
09b7b55659
Merge "Include whether in touch mode for WindowlessWindowManager" into rvc-qpr-dev
2021-03-10 22:58:08 +00:00
Sean Stout
69ff259fe1
Merge "Fix DisplayGroup event reporting behavior." into sc-dev
2021-03-10 22:51:14 +00:00
Benedict Wong
e57540d009
Merge changes Iad296830,I826711bb,Ieb2a9b20,I6b688b00 am: 03c0059bb1
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624741
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I77f958e638b209a3b7f6544e02413420983c121b
2021-03-10 22:51:08 +00:00
Antonio Kantek
5c5f5ba178
[automerger skipped] Merge "Use futures for binding and talking to the ExternalStorageService." into rvc-qpr-dev am: 61e7956648 am: 4ea168e834 -s ours
...
am skip reason: Change-Id I1b7fde2f6ed1074b9c814d56808ab1614f25aead with SHA-1 9252dfb493 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13713298
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I067ec2e57a7a1cb34552a25859a8e50c4f2b9ad0
2021-03-10 22:39:07 +00:00
Miranda Kephart
b76770da58
[automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into oc-mr1-dev am: 84fcb616be -s ours am: 663162c3b0 -s ours am: 250d08c924 am: 91175a30c6 -s ours am: c202b0836a am: 8d8067af60 am: 08071de04c -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420818
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I03b76489cb100383351f659c61b563dd0ddfa85e
2021-03-10 22:38:48 +00:00
Miranda Kephart
132b27dbfc
[automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into pi-dev am: 5a8e9742ed -s ours am: c7d3369e99 am: 46ecf995d7 -s ours am: 55255a5a1d am: 8487e20527 am: 528e455436 -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420817
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I86d0af01663cbe42474d5c056a690be855cebce4
2021-03-10 22:38:24 +00:00
Miranda Kephart
6f516e48b2
[automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into qt-dev am: e0135acaa6 am: 1c0fa75c03 -s ours am: 8d2a5195e2 am: dfa0e0a7fd am: 7ee1b92549 -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420541
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I8dec407acd28710a8ef4c084cd5fe8d77532cf4f
2021-03-10 22:38:02 +00:00
Miranda Kephart
c1566ca9f1
[automerger skipped] [DO NOT MERGE] Close screenshot process on user switched am: 9908e1a145 -s ours am: e46f0812c6 -s ours am: a53e25c4c4 am: 26c342dd01 am: f90af7ed7f -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420541
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ica6fc2f58438d9b90dfd7afe5524235e594fc0f1
2021-03-10 22:37:52 +00:00
Kevin Han
20414370df
Merge "Add local service interface for app hibernation"
2021-03-10 22:37:27 +00:00
Sooraj Sasindran
897f0e2b42
Merge "Fix documentation error in cross sim config" into sc-dev
2021-03-10 22:33:14 +00:00
Jeff DeCew
364576c7e0
Merge "Flow text around the large icon." into sc-dev
2021-03-10 22:19:22 +00:00
Ilya Matyukhin
b1453c7fcf
Merge "Remove the reset method from fingerprint" into sc-dev
2021-03-10 22:17:25 +00:00
Jeff DeCew
0d0dff468a
Merge "Align the top of the largeIcon with the top of the expander when expanded." into sc-dev
2021-03-10 22:17:07 +00:00
Ilya Matyukhin
d8f5a5da0f
Merge "Remove the reset method from face" into sc-dev
2021-03-10 22:16:50 +00:00
Jeff Sharkey
5232082243
Merge "Make FileUtils#createDir threadsafe"
2021-03-10 22:02:14 +00:00
Miranda Kephart
c29882d03a
[automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into oc-mr1-dev am: 84fcb616be -s ours am: 663162c3b0 -s ours am: 250d08c924 am: 91175a30c6 -s ours am: c202b0836a am: 109f2fdd81 -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420818
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I00d6a9a211b11ca3b3698f289ce712abe04075e4
2021-03-10 21:59:48 +00:00
Miranda Kephart
41b527fc6c
[automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into pi-dev am: 5a8e9742ed -s ours am: c7d3369e99 am: 46ecf995d7 -s ours am: 55255a5a1d am: e34af6e97e -s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420817
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: If7078fc02e6121019fe7f72bd470c10cec59e2de
2021-03-10 21:59:20 +00:00