diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java index b69ad501ef4f..a9975cc341ab 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java @@ -23,7 +23,7 @@ public static boolean isMshotsUrl(final String imageUrl) { * returns a photon url for the passed image with the resize query set to the passed * dimensions - note that the passed quality parameter will only affect JPEGs */ - public static enum Quality { + public enum Quality { HIGH, MEDIUM, LOW @@ -45,13 +45,6 @@ public static String getPhotonImageUrl(String imageUrl, int width, int height, Q // remove existing query string since it may contain params that conflict with the passed ones imageUrl = UrlUtils.removeQuery(imageUrl); - // don't use with GIFs - photon breaks animated GIFs, and sometimes returns a GIF that - // can't be read by BitmapFactory.decodeByteArray (used by Volley in ImageRequest.java - // to decode the downloaded image) - if (imageUrl.endsWith(".gif")) { - return imageUrl; - } - // if this is an "mshots" url, skip photon and return it with a query that sets the width/height if (isMshotsUrl(imageUrl)) { return imageUrl + "?w=" + width + "&h=" + height; diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/WPUnderlineSpan.java b/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/WPUnderlineSpan.java index 12eadb379253..4b6805ccfd2e 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/WPUnderlineSpan.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/WPUnderlineSpan.java @@ -17,32 +17,18 @@ package org.wordpress.android.util.helpers; import android.os.Parcel; -import android.text.ParcelableSpan; -import android.text.TextPaint; -import android.text.style.CharacterStyle; -import android.text.style.UpdateAppearance; +import android.text.style.UnderlineSpan; -public class WPUnderlineSpan extends CharacterStyle - implements UpdateAppearance, ParcelableSpan { +/** + * WPUnderlineSpan is used as an alternative class to UnderlineSpan. UnderlineSpan is used by EditText auto + * correct, so it can get mixed up with our formatting. + */ +public class WPUnderlineSpan extends UnderlineSpan { public WPUnderlineSpan() { + super(); } public WPUnderlineSpan(Parcel src) { - } - - public int getSpanTypeId() { - return 6; - } - - public int describeContents() { - return 0; - } - - public void writeToParcel(Parcel dest, int flags) { - } - - @Override - public void updateDrawState(TextPaint ds) { - ds.setUnderlineText(true); + super(src); } }