Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e29ad06b authored by Erik Jensen's avatar Erik Jensen Committed by Gerrit Code Review
Browse files

Merge "Allow EPUB documents to be received via Bluetooth"

parents 69b4478a e807f00f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ public class Constants {
            "text/plain",
            "text/html",
            "text/xml",
            "application/epub+zip",
            "application/zip",
            "application/vnd.ms-excel",
            "application/msword",
@@ -250,8 +251,8 @@ public class Constants {
    }

    private static boolean mimeTypeMatches(String mimeType, String matchAgainst) {
        Pattern p =
                Pattern.compile(matchAgainst.replaceAll("\\*", "\\.\\*"), Pattern.CASE_INSENSITIVE);
        String matchRegex = matchAgainst.replaceAll("\\+", "\\\\+").replaceAll("\\*", ".*");
        Pattern p = Pattern.compile(matchRegex, Pattern.CASE_INSENSITIVE);
        return p.matcher(mimeType).matches();
    }