Merge "Handle SecurityException in ClipData.Item.coerceToText"
This commit is contained in:
committed by
Android (Google) Code Review
commit
fc8139d086
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user