Unable to load BRs in SAF of FileSystemProvider
Files.listFiles() indicate if this abstract pathname does "not denote a directory"
It will returns null and cause "NullPointerException: Attempt to get length of null array"
in the queryChildDocuments()
Solution:
Use FileUtils.listFilesOrEmpty(parent) and check parent.isDirectory() to avoid NPE
Bug: 111565816
Test: Manual, trigger bugreport
rm -rf /data/user_de/0/com.android.shell/files/bugreports
launch Files/Bugreport observe there should not happen exception
Change-Id: I9d0835d562af7cf3c9bdaeab52cf41e86e3a8f62
1 file changed