Support scanDirectories with JNI callback function

MtpServer needs this function to update the database for directory
copy operation.

Test: Call this function from MtpServer and database is updated in
directory copy scenario.

Change-Id: I9b316f4dbf7f35922292c33ab02f9efebc867aa8
Signed-off-by: kyle_tso <kyle_tso@htc.com>
This commit is contained in:
kyle_tso
2017-11-22 20:11:27 +08:00
parent e887e2b9c1
commit b4aa69fd11
2 changed files with 24 additions and 0 deletions

View File

@@ -421,6 +421,12 @@ public class MtpDatabase implements AutoCloseable {
}
}
private void doScanDirectory(String path) {
String[] scanPath;
scanPath = new String[] { path };
mMediaScanner.scanDirectories(scanPath);
}
private Cursor createObjectQuery(int storageID, int format, int parent) throws RemoteException {
String where;
String[] whereArgs;