summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorDaichi Hirono <hirono@google.com>2017-11-21 15:11:01 +0900
committerDaichi Hirono <hirono@google.com>2017-12-12 15:54:00 +0900
commitbb28efb6311f203f74e2dbc5de439d53b1ea8cd5 (patch)
treed86eaecae7ddeddf041789581cb78ef25120b152 /tools/aapt2/java/JavaClassGenerator.cpp
parent3952e2566324f8a6fd14bdde540e9790714a1391 (diff)
Add pre/post callback to IDragDropCallback
Previoulsy we uses mWriteLock to avoid race condition between DragDropController and IDragDropCallback. However it turns out we have dead lock here. 1. DragDropController invokes performDrag for drag operation B with holding write lock. 2. The Callback initiates other drag operation A before processing B. 3. A does not complete because DragDropController holding write lock for B. B does not complete because the callback try to process request A before B. The CL removes write lock and separates the existing callback methods into two: pre and post callbacks. 1. DragDropController invokes prePerfromDrag for drag operaiton B, which blocks. 2. The callback initiates other drag operation A before processing B. 3. DragDropController invokes prePerfromDrag for drag operaiton A, which returns immediately. DragDropController processes A and invokes postPefromCallback for A. 4. The Callback unblocks prePerfromDrag for B. Bug: 65564090 Test: android.server.wm.CrossAppDragAndDropTests, manually check the drag and drop behavior on test app. Change-Id: I393a031cb276d6fa7ea56909959d0f2c5d621125
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions