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

Commit 564e1f86 authored by Youkichi Hosoi's avatar Youkichi Hosoi
Browse files

Make StubVolumes visible for read

Set MOUNT_FLAG_VISIBLE_FOR_READ for StubVolumes that are not specified
to be visible so that they are indexed by MediaScanner, but no "Android"
directory is created inside them.

Bug: 206019156
Test: StubVolumes not specified to be visible are mounted with the flag
Test: MOUNT_FLAG_VISIBLE_FOR_READ.
Change-Id: I6b8f4a498651d996e57dff45f4875dd05f786086
parent 9b033785
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1592,6 +1592,8 @@ class StorageManagerService extends IStorageManager.Stub
        } else if (vol.type == VolumeInfo.TYPE_STUB) {
            if (vol.disk.isStubVisible()) {
                vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE_FOR_WRITE;
            } else {
                vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE_FOR_READ;
            }
            vol.mountUserId = mCurrentUserId;
            mHandler.obtainMessage(H_VOLUME_MOUNT, vol).sendToTarget();