[DocsUI, Search]: Fix work profile crash.
When switching to work profile while using DocumentsUI as a file picker it is possible for the top of the folder stack to return null. This CL adds protection against this case. If the top of the stack is null, we resort to listing the root. A unit test that checks the new code works as intended is added to FolderLoaderTest. Bug: 417872920 Test: DocumentsUIUnitTests Flag: com.android.documentsui.flags.use_search_v2_read_only Change-Id: I034d2a0c876c232b431d3b5d6217c59b550655d1
Loading
Please register or sign in to comment