Merge "Also consider secondary storage when verifying paths" into lmp-dev

This commit is contained in:
Marco Nelissen
2014-10-16 00:38:01 +00:00
committed by Android (Google) Code Review

View File

@@ -306,8 +306,10 @@ public class MtpDatabase {
try {
File f = new File(path);
String canonical = f.getCanonicalPath();
if (canonical.startsWith(mMediaStoragePath)) {
return true;
for (String root: mStorageMap.keySet()) {
if (canonical.startsWith(root)) {
return true;
}
}
} catch (IOException e) {
// ignore