From 3e5b9ff8c8bcec3d3819f7371cbe38d9863a9cc4 Mon Sep 17 00:00:00 2001 From: rovo89 Date: Fri, 28 Aug 2015 13:12:01 +0100 Subject: [PATCH] samsung: increase String VTableLenght to support String.clear() --- runtime/mirror/string-inl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/mirror/string-inl.h b/runtime/mirror/string-inl.h index d283f588660..9ba0134800a 100644 --- a/runtime/mirror/string-inl.h +++ b/runtime/mirror/string-inl.h @@ -32,6 +32,11 @@ namespace mirror { inline uint32_t String::ClassSize(size_t pointer_size) { uint32_t vtable_entries = Object::kVTableLength + 52; + if (IsSamsungROM()) { + // Samsung added a new method "string.clear()" + // Increase vtable length to support it + vtable_entries++; + } return Class::ComputeClassSize(true, vtable_entries, 0, 1, 0, 1, 2, pointer_size); }