Disable eject button for StubVolumes
StubVolumes are managed from outside Android (e.g. Chrome OS). So, they
should not be unmounted via the eject button in DocumentsUI.
Bug: 187111763
Test: (Tested in R) Manually check and confirm that the eject button is
not shown for mounted StubVolumes.
Change-Id: Ie7c6d1ec846b20694d98f4cb34099ad5dfcf6478
This commit is contained in:
@@ -236,7 +236,8 @@ public class ExternalStorageProvider extends FileSystemProvider {
|
||||
root.flags |= Root.FLAG_REMOVABLE_USB;
|
||||
}
|
||||
|
||||
if (volume.getType() != VolumeInfo.TYPE_EMULATED) {
|
||||
if (volume.getType() != VolumeInfo.TYPE_EMULATED
|
||||
&& volume.getType() != VolumeInfo.TYPE_STUB) {
|
||||
root.flags |= Root.FLAG_SUPPORTS_EJECT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user