Skip to content
Commit 20079f10 authored by Ivan Chiang's avatar Ivan Chiang
Browse files

Fix renaming file and moving file issue in MTP

After the user renames/moves a file/directory, the database of
MediaProvider is not updated. It causes that the file can't be
opened via MediaProvider. Use scanFile to instead of MP.update
for the file/directory.

Handle the .nomedia case for create/copy/move/delete/rename.
Scan the parent directory to update the database.

Test: atest MtpTests
Test: atest --test-mapping packages/providers/MediaProvider
Test: manual. 1. Move/rename the file/directory.
              2. Open the file in DocumentsUI
	      3. create/copy/move/delete/rename for .nomedia case
Bug: 169300366
Bug: 171538933
Bug: 172029805
Bug: 170798581
Change-Id: Ia37be7a027bfe502e3f7c96babe5a5bbed5f942c
parent 29f0617c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment