Snap for 7230642 from e5a8b525f8ec8e497c3b5af94f6d3b4f6db6169b to sc-release
Change-Id: I593f569a64b9ccb445e764945b4596fb6b0cdeda
diff --git a/Android.bp b/Android.bp
index b276442..5c7988d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,27 +1,9 @@
-// This file is generated by cargo2android.py --run --device --dependencies.
-
-package {
- default_applicable_licenses: ["external_rust_crates_nix_license"],
-}
-
-// Added automatically by a large-scale-change
-//
-// large-scale-change filtered out the below license kinds as false-positives:
-// SPDX-license-identifier-GPL-2.0
-// See: http://go/android-license-faq
-license {
- name: "external_rust_crates_nix_license",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-MIT",
- ],
- license_text: [
- "LICENSE",
- ],
-}
+// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
+// Do not modify this file as changes will be overridden on upgrade.
rust_library {
name: "libnix",
+ // has rustc warnings
host_supported: true,
crate_name: "nix",
srcs: ["src/lib.rs"],
@@ -31,9 +13,13 @@
"libcfg_if",
"liblibc",
],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
}
// dependent_library ["feature_list"]
// bitflags-1.2.1 "default"
// cfg-if-0.1.10
-// libc-0.2.79 "default,extra_traits,std"
+// libc-0.2.89 "default,extra_traits,std"
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..7397f01
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,14 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+ "presubmit": [
+ {
+ "name": "keystore2_crypto_test_rust"
+ },
+ {
+ "name": "vpnprofilestore_test"
+ },
+ {
+ "name": "keystore2_test"
+ }
+ ]
+}
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
new file mode 100644
index 0000000..525dd17
--- /dev/null
+++ b/patches/Android.bp.patch
@@ -0,0 +1,15 @@
+diff --git a/Android.bp b/Android.bp
+index a84b87c..d1c7d5b 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -13,6 +13,10 @@ rust_library {
+ "libcfg_if",
+ "liblibc",
+ ],
++ apex_available: [
++ "//apex_available:platform",
++ "com.android.virt",
++ ],
+ }
+
+ // dependent_library ["feature_list"]