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

Commit 2ffca839 authored by Roozbeh Pournader's avatar Roozbeh Pournader Committed by Android (Google) Code Review
Browse files

Merge "Check for existance of hyphenation pattern files first"

parents ebf3a0d5 94a8acba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -135,6 +135,10 @@ public class Hyphenator {
    private static Hyphenator loadHyphenator(HyphenationData data) {
        String patternFilename = "hyph-" + data.mLanguageTag.toLowerCase(Locale.US) + ".hyb";
        File patternFile = new File(getSystemHyphenatorLocation(), patternFilename);
        if (!patternFile.canRead()) {
            Log.e(TAG, "hyphenation patterns for " + patternFile + " not found or unreadable");
            return null;
        }
        try {
            RandomAccessFile f = new RandomAccessFile(patternFile, "r");
            try {