Bypass database operations for file managers

To improve performance for bulk create and delete operations, we allow
Holders of the MANAGE_EXTERNAL_STORAGE permission to bypass database
operations. This will lead to filesystem and database consistency
issues, but we expect file managers to run media scans appropriately
after file path operations.

Test: Manual
Bug: 157103037
Change-Id: I3ab892d0f0c7a8fe78734ebe1237b87f15b7a480
(cherry picked from commit e71c38240d5e8739ff554f35a0598398ffba4157)
(cherry picked from commit 6e5424292336dc3d519623a563fce6f70228b4c0)
1 file changed