From 7f127ba52a192d383a28f6576517c54e8146740a Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sun, 1 Sep 2019 17:35:42 -0300 Subject: [PATCH 1/2] show hidden directories in the file picker --- .../org/schabi/newpipe/util/FilePickerActivityHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java index 8e70e4f8d..82e74adec 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java @@ -115,6 +115,12 @@ public class FilePickerActivityHelper extends com.nononsenseapps.filepicker.File super.onClickOk(view); } + @Override + protected boolean isItemVisible(File file) { + if (file.isDirectory() && file.isHidden()) return true; + return super.isItemVisible(file); + } + public File getBackTop() { if (getArguments() == null) return Environment.getExternalStorageDirectory(); From 6fa72e4a52acfec04e6cd643c4f5390e6cfb0f31 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sun, 1 Sep 2019 18:07:14 -0300 Subject: [PATCH 2/2] add @NotNull --- .../java/org/schabi/newpipe/util/FilePickerActivityHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java index 82e74adec..d56913648 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java @@ -116,7 +116,7 @@ public class FilePickerActivityHelper extends com.nononsenseapps.filepicker.File } @Override - protected boolean isItemVisible(File file) { + protected boolean isItemVisible(@NonNull File file) { if (file.isDirectory() && file.isHidden()) return true; return super.isItemVisible(file); }