Merge "Check for valid paths when getVolumeList() returns invisible volumes." into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-06-10 19:38:49 +00:00
committed by Android (Google) Code Review

View File

@@ -3031,7 +3031,8 @@ class MountService extends IMountService.Stub
if (forWrite) {
match = vol.isVisibleForWrite(userId);
} else {
match = vol.isVisibleForRead(userId) || includeInvisible;
match = vol.isVisibleForRead(userId)
|| (includeInvisible && vol.getPath() != null);
}
if (!match) continue;