diff options
| -rw-r--r-- | libdexfile/dex/dex_file.cc | 19 | ||||
| -rw-r--r-- | libdexfile/dex/dex_file.h | 3 |
2 files changed, 0 insertions, 22 deletions
diff --git a/libdexfile/dex/dex_file.cc b/libdexfile/dex/dex_file.cc index 1f471106df..8cfee6655e 100644 --- a/libdexfile/dex/dex_file.cc +++ b/libdexfile/dex/dex_file.cc @@ -349,25 +349,6 @@ const DexFile::TypeId* DexFile::FindTypeId(const char* string) const { return nullptr; } -const DexFile::StringId* DexFile::FindStringId(const uint16_t* string, size_t length) const { - int32_t lo = 0; - int32_t hi = NumStringIds() - 1; - while (hi >= lo) { - int32_t mid = (hi + lo) / 2; - const DexFile::StringId& str_id = GetStringId(dex::StringIndex(mid)); - const char* str = GetStringData(str_id); - int compare = CompareModifiedUtf8ToUtf16AsCodePointValues(str, string, length); - if (compare > 0) { - lo = mid + 1; - } else if (compare < 0) { - hi = mid - 1; - } else { - return &str_id; - } - } - return nullptr; -} - const DexFile::TypeId* DexFile::FindTypeId(dex::StringIndex string_idx) const { int32_t lo = 0; int32_t hi = NumTypeIds() - 1; diff --git a/libdexfile/dex/dex_file.h b/libdexfile/dex/dex_file.h index 683a8243ed..4098b4250a 100644 --- a/libdexfile/dex/dex_file.h +++ b/libdexfile/dex/dex_file.h @@ -504,9 +504,6 @@ class DexFile { const TypeId* FindTypeId(const char* string) const; - // Looks up a string id for a given utf16 string. - const StringId* FindStringId(const uint16_t* string, size_t length) const; - // Returns the number of type identifiers in the .dex file. uint32_t NumTypeIds() const { DCHECK(header_ != nullptr) << GetLocation(); |