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

Commit 48b00743 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Purge dict reading code for 401 and create for 402."

parents 2d7feb5a 07e14126
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -115,8 +115,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
    private boolean needsToMigrateDictionary(final int formatVersion) {
        // When we bump up the dictionary format version, the old version should be added to here
        // for supporting migration. Note that native code has to support reading such formats.
        return formatVersion == FormatSpec.VERSION4_ONLY_FOR_TESTING
                || formatVersion == FormatSpec.VERSION401;
        return formatVersion == FormatSpec.VERSION4_ONLY_FOR_TESTING;
    }

    public boolean isValidDictionaryLocked() {
+5 −5
Original line number Diff line number Diff line
@@ -100,8 +100,8 @@ LATIN_IME_CORE_SRC_FILES := \
        log_utils.cpp \
        time_keeper.cpp)

LATIN_IME_CORE_SRC_FILES_BACKWARD_V401 := \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v401/, \
LATIN_IME_CORE_SRC_FILES_BACKWARD_V402 := \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v402/, \
        ver4_dict_buffers.cpp \
        ver4_dict_constants.cpp \
        ver4_patricia_trie_node_reader.cpp \
@@ -110,16 +110,16 @@ LATIN_IME_CORE_SRC_FILES_BACKWARD_V401 := \
        ver4_patricia_trie_reading_utils.cpp \
        ver4_patricia_trie_writing_helper.cpp \
        ver4_pt_node_array_reader.cpp) \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v401/content/, \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v402/content/, \
        bigram_dict_content.cpp \
        probability_dict_content.cpp \
        shortcut_dict_content.cpp \
        sparse_table_dict_content.cpp \
        terminal_position_lookup_table.cpp) \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v401/bigram/, \
    $(addprefix suggest/policyimpl/dictionary/structure/backward/v402/bigram/, \
        ver4_bigram_list_policy.cpp)

LATIN_IME_CORE_SRC_FILES += $(LATIN_IME_CORE_SRC_FILES_BACKWARD_V401)
LATIN_IME_CORE_SRC_FILES += $(LATIN_IME_CORE_SRC_FILES_BACKWARD_V402)

LATIN_IME_CORE_TEST_FILES := \
    defines_test.cpp \
+1 −3
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ class HeaderPolicy : public DictionaryHeaderStructurePolicy {
        switch (mDictFormatVersion) {
            case FormatUtils::VERSION_2:
                return FormatUtils::VERSION_2;
            case FormatUtils::VERSION_401:
                return FormatUtils::VERSION_401;
            case FormatUtils::VERSION_4_ONLY_FOR_TESTING:
                return FormatUtils::VERSION_4_ONLY_FOR_TESTING;
            case FormatUtils::VERSION_4:
@@ -249,7 +247,7 @@ class HeaderPolicy : public DictionaryHeaderStructurePolicy {
    }

    bool supportsBeginningOfSentence() const {
        return mDictFormatVersion > FormatUtils::VERSION_401;
        return mDictFormatVersion >= FormatUtils::VERSION_4;
    }

 private:
+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ typedef DictionaryHeaderStructurePolicy::AttributeMap AttributeMap;
        case FormatUtils::VERSION_2:
            // Version 2 dictionary writing is not supported.
            return false;
        case FormatUtils::VERSION_401:
        case FormatUtils::VERSION_4_ONLY_FOR_TESTING:
        case FormatUtils::VERSION_4:
        case FormatUtils::VERSION_4_DEV:
+0 −0

File moved.

Loading