Commit 78f52e5b authored by Min Qin's avatar Min Qin Committed by Commit Bot

Catches all exceptions when firing an intent to launch a file

If a download is on external sdcard, FileProvider won't be able to
generate a content URI for the file. On some devices this will raise
an exception. This CL just catches all exception in case that happens.

BUG=893053

Change-Id: I3fdc35a049226970f0027dc7598a274135d9c0db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562252Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649716}
parent f8e49fb7
......@@ -726,6 +726,8 @@ public class DownloadUtils {
+ intent.getData().getScheme(), ex);
} catch (SecurityException ex) {
Log.d(TAG, "cannot open intent: " + intent, ex);
} catch (Exception ex) {
Log.d(TAG, "cannot open intent: " + intent, ex);
}
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment