Snap for 7209903 from 18a19269d2fd84a3eeb230c2b0447768d9b705b2 to sc-d1-release

Change-Id: Ie9f9f802393c3ca7edbd5c994690a3136ba8f22c
diff --git a/Android.bp b/Android.bp
index 9fa3e87..48e399f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,36 +1,6 @@
-// This file is generated by cargo2android.py --run --dependencies --features= --device.
+// This file is generated by cargo2android.py --run --dependencies --features= --device --patch=patches/Android.bp.patch.
 // Do not modify this file as changes will be overridden on upgrade.
 
-package {
-    default_applicable_licenses: ["external_rust_crates_clap_license"],
-}
-
-// Added automatically by a large-scale-change that took the approach of
-// 'apply every license found to every target'. While this makes sure we respect
-// every license restriction, it may not be entirely correct.
-//
-// e.g. GPL in an MIT project might only apply to the contrib/ directory.
-//
-// Please consider splitting the single license below into multiple licenses,
-// taking care not to lose any license_kind information, and overriding the
-// default license using the 'licenses: [...]' property on targets as needed.
-//
-// For unused files, consider creating a 'fileGroup' with "//visibility:private"
-// to attach the license to, and including a comment whether the files may be
-// used in the current project.
-// See: http://go/android-license-faq
-license {
-    name: "external_rust_crates_clap_license",
-    visibility: [":__subpackages__"],
-    license_kinds: [
-        "SPDX-license-identifier-Apache-2.0",
-        "SPDX-license-identifier-MIT",
-    ],
-    license_text: [
-        "LICENSE-MIT",
-    ],
-}
-
 rust_library {
     name: "libclap",
     // has rustc warnings
@@ -42,8 +12,12 @@
         "libbitflags",
         "libtextwrap",
     ],
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.virt",
+    ],
 }
 
 // dependent_library ["feature_list"]
 //   bitflags-1.2.1 "default"
-//   textwrap-0.13.3
+//   textwrap-0.13.4
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6b7ed9a..a60a6e8 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,13 +2,16 @@
 {
   "presubmit": [
     {
+      "name": "keystore2_test"
+    },
+    {
+      "name": "vpnprofilestore_test"
+    },
+    {
       "name": "libsqlite3-sys_device_test_src_lib"
     },
     {
       "name": "authfs_device_test_src_lib"
-    },
-    {
-      "name": "keystore2_test"
     }
   ]
 }
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
new file mode 100644
index 0000000..5a0245a
--- /dev/null
+++ b/patches/Android.bp.patch
@@ -0,0 +1,15 @@
+diff --git a/Android.bp b/Android.bp
+index 91fb287..583186b 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -12,6 +12,10 @@ rust_library {
+         "libbitflags",
+         "libtextwrap",
+     ],
++    apex_available: [
++        "//apex_available:platform",
++        "com.android.virt",
++    ],
+ }
+ 
+ // dependent_library ["feature_list"]