diff options
author | Nikita Dubrovsky <dubrovsky@google.com> | 2021-02-17 17:21:34 -0800 |
---|---|---|
committer | Nikita Dubrovsky <dubrovsky@google.com> | 2021-03-12 08:08:57 -0800 |
commit | 910746fe9668b6e879fb75a7a240be7fe6168d1e (patch) | |
tree | aec6d9b1f7de14df0d2524de1029f778d7890fee /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 3ca8fa18f963a32b6e30b030df729ca4750d6ce8 (diff) |
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
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions