diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-08 22:27:58 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-08 22:27:58 +0000 |
| commit | 70cd4a180a07869c538c66caa871ff459c7fccb9 (patch) | |
| tree | 87322725938ae70eac8d317378862f76e1e973bd | |
| parent | 97abb0dd0f6277a2bae7ccfd310fad9da2c613bd (diff) | |
| parent | 9079345f18adf4b731aff30a72d534994d95292e (diff) | |
| download | platform_packages_apps_Messaging-oreo-release.tar.gz platform_packages_apps_Messaging-oreo-release.tar.bz2 platform_packages_apps_Messaging-oreo-release.zip | |
Merge cherrypicks of [2688425, 2689040, 2689041, 2689042, 2688662, 2688663, 2688664, 2688426, 2688427, 2688428, 2688665, 2688666, 2688667, 2688668, 2688669, 2688670, 2688671, 2688429, 2688672, 2689043, 2688673, 2688674, 2688675, 2688676, 2688677, 2688678, 2688679, 2688430, 2688431] into oc-releaseandroid-8.0.0_r7android-8.0.0_r28android-8.0.0_r13oreo-release
Change-Id: I3ae8245371b36880430f9ba905fab863a2b462a6
| -rw-r--r-- | src/com/android/messaging/datamodel/media/GifImageResource.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/messaging/datamodel/media/GifImageResource.java b/src/com/android/messaging/datamodel/media/GifImageResource.java index d50cf47..6801165 100644 --- a/src/com/android/messaging/datamodel/media/GifImageResource.java +++ b/src/com/android/messaging/datamodel/media/GifImageResource.java @@ -23,6 +23,7 @@ import android.support.rastermill.FrameSequence; import android.support.rastermill.FrameSequenceDrawable; import com.android.messaging.util.Assert; +import com.android.messaging.util.LogUtil; import java.io.IOException; import java.io.InputStream; @@ -55,7 +56,14 @@ public class GifImageResource extends ImageResource { @Override public Drawable getDrawable(Resources resources) { - return new FrameSequenceDrawable(mFrameSequence); + try { + return new FrameSequenceDrawable(mFrameSequence); + } catch (final Exception e) { + // Malicious gif images can make platform throw different kind of exceptions. Catch + // them all. + LogUtil.e(LogUtil.BUGLE_TAG, "Error getting drawable for GIF", e); + return null; + } } @Override |
