Merge "Fix getStorageVolumes to return only storage volumes available to the calling user"

This commit is contained in:
Shikha Malhotra
2022-02-09 12:15:31 +00:00
committed by Android (Google) Code Review

View File

@@ -4071,7 +4071,7 @@ class StorageManagerService extends IStorageManager.Stub
|| (includeSharedProfile && vol.isVisibleForWrite(userIdSharingMedia));
} else {
match = vol.isVisibleForUser(userId)
|| (includeInvisible && vol.getPath() != null)
|| (!vol.isVisible() && includeInvisible && vol.getPath() != null)
|| (includeSharedProfile && vol.isVisibleForRead(userIdSharingMedia));
}
if (!match) continue;