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

Commit 1c5b2a41 authored by Jean Chalard's avatar Jean Chalard
Browse files

Cleanups

Follow-up to Idc6f419a

Change-Id: I4aae8f4e19f27a0a309879dc19af6e40906d58c5
parent 80180510
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -164,10 +164,10 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
        try {
            parseKeyboard(parser);
        } catch (XmlPullParserException e) {
            Log.w(BUILDER_TAG, "keyboard XML parse error: " + e);
            Log.w(BUILDER_TAG, "keyboard XML parse error", e);
            throw new IllegalArgumentException(e);
        } catch (IOException e) {
            Log.w(BUILDER_TAG, "keyboard XML parse error: " + e);
            Log.w(BUILDER_TAG, "keyboard XML parse error", e);
            throw new RuntimeException(e);
        } finally {
            parser.close();
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ final class BinaryDictionaryGetter {
                }
            }
        } catch (java.io.IOException e) {
            Log.e(TAG, "IOException trying to cleanup files : " + e);
            Log.e(TAG, "IOException trying to cleanup files", e);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -321,9 +321,9 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
            tempFile.renameTo(file);
            clearFusionDictionary();
        } catch (IOException e) {
            Log.e(TAG, "IO exception while writing file: " + e);
            Log.e(TAG, "IO exception while writing file", e);
        } catch (UnsupportedFormatException e) {
            Log.e(TAG, "Unsupported format: " + e);
            Log.e(TAG, "Unsupported format", e);
        } finally {
            if (out != null) {
                try {
+5 −5
Original line number Diff line number Diff line
@@ -122,9 +122,9 @@ public final class UserHistoryDictIOUtils {
            BinaryDictInputOutput.writeDictionaryBinary(destination, fusionDict, formatOptions);
            Log.d(TAG, "end writing");
        } catch (IOException e) {
            Log.e(TAG, "IO exception while writing file: " + e);
            Log.e(TAG, "IO exception while writing file", e);
        } catch (UnsupportedFormatException e) {
            Log.e(TAG, "Unsupported fomat: " + e);
            Log.e(TAG, "Unsupported format", e);
        }
    }

@@ -184,11 +184,11 @@ public final class UserHistoryDictIOUtils {
            BinaryDictIOUtils.readUnigramsAndBigramsBinary(buffer, unigrams, frequencies,
                    bigrams);
        } catch (IOException e) {
            Log.e(TAG, "IO exception while reading file: " + e);
            Log.e(TAG, "IO exception while reading file", e);
        } catch (UnsupportedFormatException e) {
            Log.e(TAG, "Unsupported format: " + e);
            Log.e(TAG, "Unsupported format", e);
        } catch (ArrayIndexOutOfBoundsException e) {
            Log.e(TAG, "ArrayIndexOutOfBoundsException while reading file: " + e);
            Log.e(TAG, "ArrayIndexOutOfBoundsException while reading file", e);
        }
        addWordsFromWordMap(unigrams, frequencies, bigrams, dict);
    }
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
            if (DBG) {
                throw e;
            } else {
                Log.e(TAG, "Exception while spellcheking: " + e);
                Log.e(TAG, "Exception while spellcheking", e);
                return AndroidSpellCheckerService.getNotInDictEmptySuggestions();
            }
        }
Loading