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

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

Merge \"Merge \\"Build both filename views before deleting.\\" into...

Merge \"Merge \\"Build both filename views before deleting.\\" into nyc-mr1-dev am: fff6a114\" into nyc-mr1-dev-plus-aosp
am: 40a4bf7d

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

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


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