Remove unused length from DexFile GetString calls.

Address extra review comments from commit
dfb325e0ddd746cd8f7c2e3723b3a573eb7cc111.

Change-Id: If76e81e7af5870431901de0bf561e0f827435fe3
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index d3bb483..7e09a48 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -457,9 +457,8 @@
   int32_t hi = NumStringIds() - 1;
   while (hi >= lo) {
     int32_t mid = (hi + lo) / 2;
-    uint32_t length;
     const DexFile::StringId& str_id = GetStringId(mid);
-    const char* str = GetStringDataAndUtf16Length(str_id, &length);
+    const char* str = GetStringData(str_id);
     int compare = CompareModifiedUtf8ToModifiedUtf8AsUtf16CodePointValues(string, str);
     if (compare > 0) {
       lo = mid + 1;
@@ -477,9 +476,8 @@
   int32_t hi = NumStringIds() - 1;
   while (hi >= lo) {
     int32_t mid = (hi + lo) / 2;
-    uint32_t length;
     const DexFile::StringId& str_id = GetStringId(mid);
-    const char* str = GetStringDataAndUtf16Length(str_id, &length);
+    const char* str = GetStringData(str_id);
     int compare = CompareModifiedUtf8ToUtf16AsCodePointValues(str, string);
     if (compare > 0) {
       lo = mid + 1;
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 7901ea7..a9c24e6 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -575,6 +575,7 @@
     return StringDataByIdx(GetProtoId(method_id.proto_idx_).shorty_idx_);
   }
   const char* GetMethodShorty(const MethodId& method_id, uint32_t* length) const {
+    // Using the UTF16 length is safe here as shorties are guaranteed to be ASCII characters.
     return StringDataAndUtf16LengthByIdx(GetProtoId(method_id.proto_idx_).shorty_idx_, length);
   }
   // Returns the number of class definitions in the .dex file.
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index 71ed95c..aef000c 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -221,8 +221,7 @@
     return;
   }
   const DexFile* dex_file = dex_cache->GetDexFile();
-  uint32_t utf16Size;
-  const char* utf8 = dex_file->StringDataAndUtf16LengthByIdx(string_idx, &utf16Size);
+  const char* utf8 = dex_file->StringDataByIdx(string_idx);
   string = strings[utf8];
   if (string == NULL) {
     return;