commit | b716f50c6f30b347b403db8b39598c38aadd8c64 | [log] [tgz] |
---|---|---|
author | Jay Shrauner <shrauner@google.com> | Wed Jan 14 16:11:08 2015 -0800 |
committer | Jay Shrauner <shrauner@google.com> | Thu Jan 15 03:00:40 2015 -0800 |
tree | 3c9d766b0ae719c40dfd516facd55873129f9bf2 | |
parent | aace61083cb3df64910c49e50d54b9618dc433ac [diff] |
Catch remote NPEs from photo pickers Bug: 19017343 Change-Id: Iae7c9848f950178aede77d8d09973ad1cd4ab5d6
diff --git a/src/com/android/contacts/util/ContactPhotoUtils.java b/src/com/android/contacts/util/ContactPhotoUtils.java index 3f79da5..53ea396 100644 --- a/src/com/android/contacts/util/ContactPhotoUtils.java +++ b/src/com/android/contacts/util/ContactPhotoUtils.java
@@ -164,7 +164,7 @@ totalLength += length; } Log.v(TAG, "Wrote " + totalLength + " bytes for photo " + inputUri.toString()); - } catch (IOException e) { + } catch (IOException | NullPointerException e) { Log.e(TAG, "Failed to write photo: " + inputUri.toString() + " because: " + e); return false; } finally { @@ -177,5 +177,3 @@ return true; } } - -