commit | c59bca903fc7020dd2c104a9d818e72272584cf4 | [log] [tgz] |
---|---|---|
author | Jeff Sharkey <jsharkey@android.com> | Mon Jun 15 19:07:59 2020 -0600 |
committer | Jeff Sharkey <jsharkey@android.com> | Tue Jun 16 11:38:45 2020 -0600 |
tree | feac452656a21159196eaf37effc0cdb06a3a74b | |
parent | a2bdf54aba819eb46e8e39fad7eab2ac22b50748 [diff] |
Avoid deadlock during applyBatch(). We've found evidence that apps performing applyBatch() operations can cause a deadlock if they attempt to scanFile() while another scan operation is already in progress. To solve this, we delay our blocking scan operations until after we've released any database transaction held by applyBatch(). Bug: 158293295 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: I53cf76af1fdf00a79245ddf6e2a4384841cfab16