Don't use profiles with vm safe mode

vm safe mode uses interpret only compiler filter, this filter will
generate a full app image if a profile is also passed down. App
image generation without a profile currently has a bug where uses
library is not pruned correctly.

Bug: 30688277

Change-Id: I60d87d698789583b8ab797eb47d031c96caf6d9b
Test: N5X boot, package compile speed-profile comb.BBClient
diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp
index d406179..2014e99 100644
--- a/cmds/installd/commands.cpp
+++ b/cmds/installd/commands.cpp
@@ -1568,6 +1568,9 @@
     bool boot_complete = (dexopt_flags & DEXOPT_BOOTCOMPLETE) != 0;
     bool profile_guided = (dexopt_flags & DEXOPT_PROFILE_GUIDED) != 0;
 
+    // Don't use profile for vm_safe_mode. b/30688277
+    profile_guided = profile_guided && !vm_safe_mode;
+
     CHECK(pkgname != nullptr);
     CHECK(pkgname[0] != 0);