Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab062fc8 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge \"Build both filename views before deleting.\" into nyc-mr1-dev

am: fff6a114

Change-Id: Ie97bade1f8396c3c08f622f2533d42d115568e08
parents 91eaa3ec fff6a114
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -484,6 +484,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
    @Override
    public void deleteDocument(String docId) throws FileNotFoundException {
        final File file = getFileForDocId(docId);
        final File visibleFile = getFileForDocId(docId, true);

        final boolean isDirectory = file.isDirectory();
        if (isDirectory) {
            FileUtils.deleteContents(file);
@@ -492,7 +494,6 @@ public class ExternalStorageProvider extends DocumentsProvider {
            throw new IllegalStateException("Failed to delete " + file);
        }

        final File visibleFile = getFileForDocId(docId, true);
        if (visibleFile != null) {
            final ContentResolver resolver = getContext().getContentResolver();
            final Uri externalUri = MediaStore.Files.getContentUri("external");