Merge "Fix getStorageVolumes to return public volumes visible to userIdSharingMedia with."
This commit is contained in:
@@ -3851,8 +3851,12 @@ class StorageManagerService extends IStorageManager.Stub
|
|||||||
// Return both read only and write only volumes. When includeSharedProfile is
|
// Return both read only and write only volumes. When includeSharedProfile is
|
||||||
// true, all the volumes of userIdSharingMedia should be returned when queried
|
// true, all the volumes of userIdSharingMedia should be returned when queried
|
||||||
// from the user it shares media with
|
// from the user it shares media with
|
||||||
|
// Public Volumes will be also be returned if visible to the
|
||||||
|
// userIdSharingMedia with.
|
||||||
match = vol.isVisibleForUser(userId)
|
match = vol.isVisibleForUser(userId)
|
||||||
|| (!vol.isVisible() && includeInvisible && vol.getPath() != null)
|
|| (!vol.isVisible() && includeInvisible && vol.getPath() != null)
|
||||||
|
|| (vol.getType() == VolumeInfo.TYPE_PUBLIC
|
||||||
|
&& vol.isVisibleForUser(userIdSharingMedia))
|
||||||
|| (includeSharedProfile && vol.isVisibleForUser(userIdSharingMedia));
|
|| (includeSharedProfile && vol.isVisibleForUser(userIdSharingMedia));
|
||||||
}
|
}
|
||||||
if (!match) continue;
|
if (!match) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user