Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ss-Android into feature/plans-master

Conflicts:
	WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefs.java
  • Loading branch information
nbradbury committed Feb 25, 2016
2 parents 346be68 + 9ca8561 commit e6a2785
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ public static boolean isValidImage(String url) {
if (url == null) {
return false;
}

url = url.toLowerCase();
return url.endsWith(".png") || url.endsWith(".jpg") || url.endsWith(".jpeg") || url.endsWith(".gif");
}

public static boolean isDocument(String url) {
if (url == null) {
return false;
}

url = url.toLowerCase();
return url.endsWith(".doc") || url.endsWith(".docx") || url.endsWith(".odt") || url.endsWith(".pdf");
}

public static boolean isPowerpoint(String url) {
if (url == null) {
return false;
}

url = url.toLowerCase();
return url.endsWith(".ppt") || url.endsWith(".pptx") || url.endsWith(".pps") || url.endsWith(".ppsx") ||
url.endsWith(".key");
}
Expand All @@ -58,14 +58,15 @@ public static boolean isSpreadsheet(String url) {
if (url == null) {
return false;
}

url = url.toLowerCase();
return url.endsWith(".xls") || url.endsWith(".xlsx");
}

public static boolean isVideo(String url) {
if (url == null) {
return false;
}
url = url.toLowerCase();
return url.endsWith(".ogv") || url.endsWith(".mp4") || url.endsWith(".m4v") || url.endsWith(".mov") ||
url.endsWith(".wmv") || url.endsWith(".avi") || url.endsWith(".mpg") || url.endsWith(".3gp") ||
url.endsWith(".3g2") || url.contains("video");
Expand All @@ -75,6 +76,7 @@ public static boolean isAudio(String url) {
if (url == null) {
return false;
}
url = url.toLowerCase();
return url.endsWith(".mp3") || url.endsWith(".ogg") || url.endsWith(".wav") || url.endsWith(".wma") ||
url.endsWith(".aiff") || url.endsWith(".aif") || url.endsWith(".aac") || url.endsWith(".m4a");
}
Expand Down

0 comments on commit e6a2785

Please sign in to comment.