Merge "Handle SecurityException in ClipData.Item.coerceToText"

This commit is contained in:
TreeHugger Robot
2017-02-16 22:22:01 +00:00
committed by Android (Google) Code Review

View File

@@ -353,6 +353,9 @@ public class ClipData implements Parcelable {
}
return builder.toString();
} catch (SecurityException e) {
Log.w("ClipData", "Failure opening stream", e);
} catch (FileNotFoundException e) {
// Unable to open content URI as text... not really an
// error, just something to ignore.
@@ -536,6 +539,9 @@ public class ClipData implements Parcelable {
return Html.escapeHtml(text);
}
} catch (SecurityException e) {
Log.w("ClipData", "Failure opening stream", e);
} catch (FileNotFoundException e) {
// Unable to open content URI as text... not really an
// error, just something to ignore.