New issue
Advanced search Search tips

Issue 709584 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

Use async task to generate intent when user tapping on Download Home

Project Member Reported by qin...@chromium.org, Apr 7 2017

Issue description

Currently in DownloadUtils.openFile(), we remove the StrictMode violation when user tapping on a download item.

We should investigate whether this can be done through an AsyncTask.






 
Cc: -twelling...@chromium.org
Owner: dtrainor@chromium.org
Dave owns this now.
We open the downloaded file in direct response to a user request, so we made an intentional decision to allow the strict mode violation rather than queue up an AsyncTask. If we queue a task, the file will open at some unspecified point in the future rather than immediately.

This is documented in the DownloadUtils#getUriForItem():

// #getContentUriFromFile causes a disk read when it calls into FileProvider#getUriForFile.
// Obtaining a content URI is on the critical path for creating a share intent after the
// user taps on the share button, so even if we were to run this method on a background
// thread we would have to wait. As it depends on user-selected items, we cannot
// know/preload which URIs we need until the user presses share.
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 9 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment