We only need the heap lock when trimming.

Change-Id: I217fb11738dbb6cd3a5b045e006042b79f45a596
diff --git a/src/dalvik_system_VMRuntime.cc b/src/dalvik_system_VMRuntime.cc
index feb7749..4ec2af8 100644
--- a/src/dalvik_system_VMRuntime.cc
+++ b/src/dalvik_system_VMRuntime.cc
@@ -21,7 +21,6 @@
 #include "object_utils.h"
 #include "space.h"
 #include "thread.h"
-#include "thread_list.h"
 
 #include "JniConstants.h" // Last to avoid problems with LOG redefinition.
 #include "toStringArray.h"
@@ -134,7 +133,7 @@
 }
 
 void VMRuntime_trimHeap(JNIEnv* env, jobject) {
-  ScopedThreadListLock thread_list_lock;
+  ScopedHeapLock heap_lock;
   uint64_t start_ns = NanoTime();
   Heap::GetAllocSpace()->Trim();
   VLOG(gc) << "VMRuntime_trimHeap took " << PrettyDuration(NanoTime() - start_ns);