prefer_staged keeps factory version

We need to pass inactive/factory apexes as well for some types of
apexes. When a VM app sets "prefer_staged", it accidentally removed
inactive/factory apexes by overwriting them with staged apexes based on
apex name.

This causes CompOS to fail when running verification after mainline
update because the VM sees the identity has changed due to different set
of input apexes from the last run which was before update using
"prefer_staged".

Now "staged" apexes are handled correctly by keeping factory/inactive
apexes and updating only active ones.

Bug: 257377686
Test: virtualizationservice_device_test
Change-Id: Ic2fa826df484ba70f5fbb8bb044fc74b3f20a5ef
diff --git a/virtualizationservice/Android.bp b/virtualizationservice/Android.bp
index 26d41c9..d6f4607 100644
--- a/virtualizationservice/Android.bp
+++ b/virtualizationservice/Android.bp
@@ -71,5 +71,8 @@
 rust_test {
     name: "virtualizationservice_device_test",
     defaults: ["virtualizationservice_defaults"],
+    rustlibs: [
+        "libtempfile",
+    ],
     test_suites: ["general-tests"],
 }