Fix bug in getStorageVolumesIncludingSharedProfiles
The API currently doesn't return clone profile volumes correctly because it only looks for volumes visible to the clone for read. Changed it to include writable volumes as well Test: atest AppCloningHostTest#testGetStorageVolumesIncludingSharedProfiles Bug: 230828743 Change-Id: I4db128027e622ab807c1fbee664dfa7d9a3a26aa
This commit is contained in:
@@ -3880,9 +3880,12 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
match = vol.isVisibleForWrite(userId)
|
||||
|| (includeSharedProfile && vol.isVisibleForWrite(userIdSharingMedia));
|
||||
} else {
|
||||
// Return both read only and write only volumes. When includeSharedProfile is
|
||||
// true, all the volumes of userIdSharingMedia should be returned when queried
|
||||
// from the user it shares media with
|
||||
match = vol.isVisibleForUser(userId)
|
||||
|| (!vol.isVisible() && includeInvisible && vol.getPath() != null)
|
||||
|| (includeSharedProfile && vol.isVisibleForRead(userIdSharingMedia));
|
||||
|| (includeSharedProfile && vol.isVisibleForUser(userIdSharingMedia));
|
||||
}
|
||||
if (!match) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user