Extend DocumentsContract search to accept mime types
1. Add the key of query arguments and match method in DocumentsContract. 2. Implement new querySearchDocuments method in DocumentsProvider, ExternalStoragProvider and FileSystemProvider. Bug: 111786939 Test: Manual Test Change-Id: I04e9f2be971f10ac1e9584a3486c948aaddea0a4
This commit is contained in:
@@ -541,14 +541,14 @@ public class ExternalStorageProvider extends FileSystemProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor querySearchDocuments(String rootId, String query, String[] projection)
|
||||
public Cursor querySearchDocuments(String rootId, String[] projection, Bundle queryArgs)
|
||||
throws FileNotFoundException {
|
||||
final File parent;
|
||||
synchronized (mRootsLock) {
|
||||
parent = mRoots.get(rootId).path;
|
||||
}
|
||||
|
||||
return querySearchDocuments(parent, query, projection, Collections.emptySet());
|
||||
return querySearchDocuments(parent, projection, Collections.emptySet(), queryArgs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user