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>
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java
index adcd79b..09a04bc 100755
--- a/media/java/android/mtp/MtpDatabase.java
+++ b/media/java/android/mtp/MtpDatabase.java
@@ -421,6 +421,12 @@
}
}
+ 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;