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

Skip to content
Commit 2fc1baa8 authored by Shunta Sato's avatar Shunta Sato Committed by Garfield Tan
Browse files

Fix Download file can't be found in setting's recent folder

Symptom:
Download file can't be found in settings recent folder.

Root cause:
When start explore files from Settings, the intent's mType is set to
DocumentsContract.Root.MIME_TYPE_ITEM. While starting DocumentsUI,
State::acceptMimes will be set to "vnd.android.document/root" aka
DocumentsContract.Root.MIME_TYPE_ITEM. When the user tries to open
'Recent', it will finally use RecentsLoader to load all the recent
files. Before actually loading the recent files, it will use
RootsCache::getMatchingRootsBlocking to get all the matching roots.
In RootsCache::getMatchingRoots, it will check whether the target's
mime matches the State::acceptMimes or not. Since State::acceptMimes
is set to DocumentsContract.Root.MIME_TYPE_ITEM, they (video, audio,
image, etc) will fail this match, as a result, there will be no items
found for 'Recent'.

Solution:
If the mime type is "vnd.android.document/root", we will treat it as
'*/*'

Bug: 35415722
Author: JiongXuan Gao <jiongxuan.xa.gao@sonymobile.com>
Change-Id: I816ce0d55b259a7b26ac3c734990a183cd5ab504
parent 04d1b155
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment