Merge "Also consider secondary storage when verifying paths" into lmp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
36c931b31a
@@ -306,9 +306,11 @@ public class MtpDatabase {
|
|||||||
try {
|
try {
|
||||||
File f = new File(path);
|
File f = new File(path);
|
||||||
String canonical = f.getCanonicalPath();
|
String canonical = f.getCanonicalPath();
|
||||||
if (canonical.startsWith(mMediaStoragePath)) {
|
for (String root: mStorageMap.keySet()) {
|
||||||
|
if (canonical.startsWith(root)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user