Previously it was checked if the volume was visible to user, but
transient volumes (such as USB drives) are not marked as such.
Fixes: 29174953
Change-Id: I5dbcc42c5b31c6856e01f73815d73482822785d9
There are scenarios - like when an SD Card is adopted as internal
storage - where the getBestVolumeDescription() returns null, in which
case we should use the StorageVolume description instead (or a default
value if such description is also null)>
Change-Id: Ia11c3f4069dfbe252c568210ee60b5d8c384d863
Fixes: 29198046
This is legal arrangement when viewing Archives.
Bug: 28923366
Change-Id: I75a26edc8dac865f536a7c5bcdef1ba00b0883f0
(cherry picked from commit a379fad3b9)
Also, fix regression...don't show "internal storage" option in Downloads.
All other modes, fix inconsistencies in presentation of
internal-storage/new-windows commands by eliminating launch mode inference.
Update VolumeInfo and MTP provider to send correct launch mode extra.
Bug: 28691735,28695347
Change-Id: Ic480925f4c8f1beee4da104a2259c1ce5f28a6a1
Pass a SelectionDetails object instead of a pile of booleans into updateActionMenu.
Normalized "is feature X enabled" naming.
Normalized menu fiddling in FilesTuner.
Bug: 28467604
Change-Id: Ic88fab78adf02f794ef0c0550443a3c075e7bab6
If USB is opened in DocumentsUI from storage settings and format it from
context menu, a user expects it goes back to storage settings after
formatting the storage. However, previous we show Downloads as a result
of redirect from the previous USB storage.
The CL changes the logic for callback so that it finishes the activity
if DocumentsUI is opened for the specific root and the root was removed
while a user stays at the root.
Fixes: 28246076
Change-Id: I5548152fc27fd13bd9b75b3083bcfbdd9f93509e
Intent.ACTION_VIEW is only used for browsing ZIP files from Downloads.
FragmentTuner should ignore the MIME type from the MIME type filter.
This CL removes the MIME type filtering logic from FilesTuner, as
I believe FilesActivity is never used for picking items, so there should
be no need to mark any files as disabled.
Bug: 28267117
Change-Id: Iba92f82aca60154674a4bea3265b0f1a3ae296dc
This is a workaround for N. Ideally we should keep the band selection,
as directory may change very often, eg. during loading, or downloading
a file (every second).
Bug: 27224277
Change-Id: I40cfb12c4f7928c4e0d6e675e91ba30ab3a6ab52
In normal circumstances, StorageVolume can only be obtained through
StorageManager and hence it will contain a valid path internally. But
the path could be invalid in at least 2 occations:
- App maliciously changed it using reflection.
- Mounted volume was ejected.
This change improves OpenExternalDirectoryActivity so it returns a
RESULT_CANCELED upon receiveving an invalid path.
BUG: 27962875
Change-Id: Ide43968babaa37961c7b704bd289f44eac952e94
Case was omitted in dialog, resulting in UnsupportedOperationException.
Remove a redundant flag check.
Bug: 28204292
Change-Id: I313d61c72596d4a127f61d557af7300f50d26bf0