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

Commit 9d508579 authored by Zim's avatar Zim
Browse files

Block SAF directory access to /sdcard/Android

This works for target R+ apps, but need to come up with a better story
for target <R. The enforcement in DocumentsUI is target SDK based
and those apps bypass the block_tree flag.

Bug: 157320644
Test: atest DocumentsTest
Change-Id: I93aea7cd5d3b7befea1f78e1cf3f31f8250f1d33
parent fe477521
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -322,6 +322,11 @@ public class ExternalStorageProvider extends FileSystemProvider {
                return true;
            }

            if (TextUtils.equals(Environment.DIRECTORY_ANDROID.toLowerCase(),
                    path.toLowerCase())) {
                return true;
            }

            return false;
        } catch (IOException e) {
            throw new IllegalArgumentException(