+43
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
The intent with ACTION_VIEW and authority com.android.externalstorage.documents: will make DocumentsUI crash. The root cause is that the intent will produce the follwoing Uri. content://com.android.externalstorage.documents/document/primary The path segment 0 is "document" and not equal with "root" so DocumentsContract.getRootId throw the IllegalArgumentException. The solution is to check whether the uri is the root uri by using try catch IllegalArgumentException when it is calling DocumentsContract.getRootId. To add testcase for testing the solution. Fixes: 69887605 Test: atest DocumentsUITests Change-Id: I9ac4dd20d56b0cfb2ad71df487ec26de8168e6b0