Commit 2b7a3df3 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Commit Bot

[Android] Fix crash uploading via Photo Picker.

Apparently, as seen in the crash report from the field,
the ContentResolver can be in a weird state when asking
for an AssetFileDescriptor for an image. The content
URI looks a bit weird, so hopefully this is a one-off
problem, and not something systemic for the whole image
collection.

Bug: 1063578, 656015
Change-Id: I00a46e26f634a080b4d10110ef4d545804bad1f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2127787Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754847}
parent bbcf989a
...@@ -529,6 +529,10 @@ public class DecoderServiceHost ...@@ -529,6 +529,10 @@ public class DecoderServiceHost
Log.e(TAG, "Unable to obtain FileDescriptor: " + e); Log.e(TAG, "Unable to obtain FileDescriptor: " + e);
closeRequestWithError(params.mUri.getPath()); closeRequestWithError(params.mUri.getPath());
return; return;
} catch (IllegalStateException e) {
Log.e(TAG, "Invalid ContentResolver state: " + e);
closeRequestWithError(params.mUri.getPath());
return;
} }
pfd = afd.getParcelFileDescriptor(); pfd = afd.getParcelFileDescriptor();
if (pfd == null) { if (pfd == null) {
......
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