Skip to content

Commit

Permalink
Merge branch 'develop' into feature/visual-editor
Browse files Browse the repository at this point in the history
Conflicts:
	WordPress/src/main/java/org/wordpress/android/ui/media/services/MediaUploadService.java
  • Loading branch information
aforcier committed Dec 17, 2015
2 parents e4b151f + 29087c9 commit aa8a1d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit aa8a1d3

Please sign in to comment.