Use homogeneous space compact by default if not low memory.

Otherwise we use semispace as the background collector.

Bug: 16401001

(cherry picked from commit a33a7fadadc7cb42c83b4aaed01f3a4c126d3075)

Change-Id: I6f753f72a05856f31a3e06427abce630231738a3
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 6b4f764..2bd994d 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -80,7 +80,7 @@
     gc::kCollectorTypeCMS),
 #error "ART default GC type must be set"
 #endif
-    background_collector_type_(gc::kCollectorTypeHomogeneousSpaceCompact),
+    background_collector_type_(gc::kCollectorTypeNone),
                                                     // If background_collector_type_ is
                                                     // kCollectorTypeNone, it defaults to the
                                                     // collector_type_ after parsing options. If
@@ -696,6 +696,12 @@
       return false;
     }
   }
+  // If not set, background collector type defaults to homogeneous compaction
+  // if not low memory mode, semispace otherwise.
+  if (background_collector_type_ == gc::kCollectorTypeNone) {
+    background_collector_type_ = low_memory_mode_ ?
+        gc::kCollectorTypeSS : gc::kCollectorTypeHomogeneousSpaceCompact;
+  }
 
   // If a reference to the dalvik core.jar snuck in, replace it with
   // the art specific version. This can happen with on device