Skip to content
Commit fe5a9eda authored by Bill Lin's avatar Bill Lin
Browse files

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
parent 94390ecd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment