Issue metadata
Sign in to add a comment
|
Media View does not seem to support sub-folders |
||||||||||||||||||||||||
Issue descriptionIn the Images media view, the folders are created per "app" or for "Downloads" in the case that image files exist. However, it looks like, the sub-folders beneath Downloads are being pulled up as a top folder beneath Images (screenshot attached). I think this could be confusing for users. Are we able to maintain the folder structure/organization for the images in the Downloads folder?
,
Feb 2 2017
Oops, I have a correction: Flattened example: Downloads/a/b/c.jpg -> Images/Download/c.jpg Hierarchical example: Downloads/a/b/c.jpg -> Images/Download/a/b/c.jpg
,
Feb 2 2017
I looked at Android MediaProvider code. In MediaProvider, every media file tracked by it has an entry in its sqlite database, and an entry has BUCKET_DISPLAY_NAME column which holds its parent directory name (e.g. Downloads/a/b/c.jpg -> "b"). The column is used to decide which virtual folder a media file appear in media documents providers. If we want to change the virtual folder name in media documents providers, an ad-hoc way is to leave the column as-is and rewrite the values on the fly when entries are queried. However this is very tricky since apps can query media entries filtered with specific BUCKET_DISPLAY_NAME value. It is very tricky to handle such queries correctly while rewriting the values on the fly, and also it will be very inefficient and impacts performance. A promising way is to change the way to compute BUCKET_DISPLAY_NAME column values and update the sqlite database. Changing the schema requires incrementing sqlite database version number which is expected to increase monotonically and one can determine the database schema from the version number alone. For this reason it is difficult to change the schema only for ARC++ due to version number conflicts and correct schema updates. So if we were to make this change, the ideal way is to submit the change to AOSP ToT, and then cherry-pick to ARC++ branch. But I guess it would be a bit controversial to treat Download directory specially in all Android devices and may take some time to get agreements. WDYT?
,
Mar 29 2017
Assigning to weifangsun@ for product decisions.
,
Jul 28 2017
,
Nov 16 2017
,
Dec 12 2017
Merging this into crbug.com/749924 as I believe the correct solution is to flatten the Media Views.
,
Dec 12 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by nya@chromium.org
, Feb 2 2017