Don't use UTF16 length as length for MUTF8.

Bug 11367555.

Change-Id: Ia0b07072a1a49d435c3b71ed9a668b316b7ff5d8
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index 871cfd5..e66e214 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -244,7 +244,7 @@
 }
 
 bool ImageWriter::IsImageClass(const Class* klass) {
-  return compiler_driver_.IsImageClass(ClassHelper(klass).GetDescriptorAsStringPiece());
+  return compiler_driver_.IsImageClass(ClassHelper(klass).GetDescriptor());
 }
 
 struct NonImageClasses {
@@ -299,7 +299,7 @@
 bool ImageWriter::NonImageClassesVisitor(Class* klass, void* arg) {
   NonImageClasses* context = reinterpret_cast<NonImageClasses*>(arg);
   if (!context->image_writer->IsImageClass(klass)) {
-    context->non_image_classes->insert(ClassHelper(klass).GetDescriptorAsStringPiece().as_string());
+    context->non_image_classes->insert(ClassHelper(klass).GetDescriptor());
   }
   return true;
 }