Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b868c7c8 authored by Himanshu Gupta's avatar Himanshu Gupta Committed by Automerger Merge Worker
Browse files

Merge "Fix getStorageVolumes to return public volumes visible to...

Merge "Fix getStorageVolumes to return public volumes visible to userIdSharingMedia with." am: e6454053 am: 0f116cb7 am: 780a3907

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2423165



Change-Id: If42c6c09f898252906e3147252275d367a4fa8a1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9ce7fbac 780a3907
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3748,8 +3748,12 @@ class StorageManagerService extends IStorageManager.Stub
                    // 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
                    // Public Volumes will be also be returned if visible to the
                    // userIdSharingMedia with.
                    match = vol.isVisibleForUser(userId)
                            || (!vol.isVisible() && includeInvisible && vol.getPath() != null)
                            || (vol.getType() == VolumeInfo.TYPE_PUBLIC
                                    && vol.isVisibleForUser(userIdSharingMedia))
                            || (includeSharedProfile && vol.isVisibleForUser(userIdSharingMedia));
                }
                if (!match) continue;