[automerger skipped] Set apex_available property am: 53d5f9f81a am: 8aa8efee20 am: c1f0121056 -s ours

am skip reason: Change-Id Id1a8a62b3213cf73b1f3a20846f70ead02b30fcc with SHA-1 53d5f9f81a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/boringssl/+/11103638

Change-Id: I20e7b7fc7ed2bddc9db0fc0a14f091010d92a42a
diff --git a/Android.bp b/Android.bp
index 510efa0..6ff1bf8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -67,6 +67,12 @@
         host: {
             host_ldlibs: ["-lpthread"],
         },
+        android: {
+            // On FIPS builds (i.e. Android only) prevent other libraries
+            // from pre-empting symbols in libcrypto which could affect FIPS
+            // compliance and cause integrity checks to fail. See b/160231064.
+            ldflags: ["-Wl,-Bsymbolic"],
+        },
     },
 
     local_include_dirs: ["src/crypto"],
@@ -124,6 +130,7 @@
         "com.android.media",
         "com.android.resolv",
     ],
+    min_sdk_version: "29",
 }
 
 bootstrap_go_package {
@@ -182,6 +189,12 @@
             cflags: [
                 "-DBORINGSSL_FIPS",
             ],
+            sanitize: {
+                // Disable address sanitizing otherwise libcrypto will not report
+                // itself as being in FIPS mode, which causes boringssl_self_test
+                // to fail.
+                address: false,
+            },
             inject_bssl_hash: true,
             static: {
                 // Disable the static version of libcrypto, as it causes
@@ -203,6 +216,7 @@
         "com.android.media",
         "com.android.resolv",
     ],
+    min_sdk_version: "29",
 }
 
 // Static library
@@ -281,6 +295,7 @@
         "com.android.conscrypt",
         "com.android.resolv",
     ],
+    min_sdk_version: "29",
 }
 
 // Tool
diff --git a/selftest/Android.bp b/selftest/Android.bp
index 49909c0..cdf66f1 100644
--- a/selftest/Android.bp
+++ b/selftest/Android.bp
@@ -43,6 +43,7 @@
         "//apex_available:platform",
         "com.android.conscrypt",
     ],
+    min_sdk_version: "29",
 }
 
 cc_binary {