Fix crash in isChildDocument when parent is in zip, and child not.
There is no regular file representation for archive documents, so the call to getFileForDocId(archivedDocId) was throwing an exception. Bug: 27383423 Change-Id: Icbc1e8ecdddc7698cfdb79b41da6e1d3cecf11ae
This commit is contained in:
@@ -391,6 +391,10 @@ public class ExternalStorageProvider extends DocumentsProvider {
|
||||
if (mArchiveHelper.isArchivedDocument(docId)) {
|
||||
return mArchiveHelper.isChildDocument(parentDocId, docId);
|
||||
}
|
||||
// Archives do not contain regular files.
|
||||
if (mArchiveHelper.isArchivedDocument(parentDocId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final File parent = getFileForDocId(parentDocId).getCanonicalFile();
|
||||
final File doc = getFileForDocId(docId).getCanonicalFile();
|
||||
|
||||
Reference in New Issue
Block a user