Features around findPath API.
* Add folders into search result
* Allow callers passing data to launch pickers at specfic location
* Rewire loadDocument() to LoadDocStackTask
* Remove VIEW intent for FilesActivity and related OpenUriForViewTask
* Add a ProviderAccess to enable testing in LoadDocStackTask
* Fix a wrong assertion in files/ActionHandlerTest
Change-Id: Iacc2b99dc68cbb4a40a4c445c69473973123c5bf
diff --git a/src/com/android/documentsui/DirectoryLoader.java b/src/com/android/documentsui/DirectoryLoader.java
index 56e76bb..8af1ab3 100644
--- a/src/com/android/documentsui/DirectoryLoader.java
+++ b/src/com/android/documentsui/DirectoryLoader.java
@@ -33,6 +33,7 @@
import com.android.documentsui.base.DocumentInfo;
import com.android.documentsui.base.FilteringCursorWrapper;
import com.android.documentsui.base.RootInfo;
+import com.android.documentsui.base.Shared;
import com.android.documentsui.roots.RootCursorWrapper;
import com.android.documentsui.sorting.SortModel;
@@ -101,8 +102,8 @@
cursor = new RootCursorWrapper(mUri.getAuthority(), mRoot.rootId, cursor, -1);
- if (mSearchMode) {
- // Filter directories out of search results, for now
+ if (mSearchMode && !Shared.ENABLE_OMC_API_FEATURES) {
+ // There is no findPath API. Enable filtering on folders in search mode.
cursor = new FilteringCursorWrapper(cursor, null, SEARCH_REJECT_MIMES);
}