Merge "Add aconfig flags for Conscrypt" into main am: 8643a41364
Original change: https://android-review.googlesource.com/c/platform/external/conscrypt/+/3188062
Change-Id: Ia04ccc3157d13e9211dd14aa2202ffb873556352
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index 1422a81..c81572c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -185,6 +185,31 @@
},
}
+aconfig_declarations {
+ name: "conscrypt-aconfig-flags",
+ package: "com.android.org.conscrypt",
+ container: "com.android.conscrypt",
+ srcs: ["conscrypt.aconfig"],
+}
+
+java_aconfig_library {
+ name: "conscrypt-aconfig-flags-lib",
+ aconfig_declarations: "conscrypt-aconfig-flags",
+ system_modules: "art-module-intra-core-api-stubs-system-modules",
+ libs: [
+ "aconfig-annotations-lib-sdk-none",
+ "unsupportedappusage",
+ ],
+ sdk_version: "none",
+ patch_module: "java.base",
+ apex_available: [
+ "com.android.conscrypt",
+ ],
+ min_sdk_version: "30",
+ installable: false,
+ visibility: ["//visibility:private"],
+}
+
cc_binary_host {
name: "conscrypt_generate_constants",
srcs: ["constants/src/gen/cpp/generate_constants.cc"],
@@ -253,6 +278,9 @@
],
libs: ["unsupportedappusage"],
+ static_libs: [
+ "conscrypt-aconfig-flags-lib",
+ ],
// Conscrypt can be updated independently from the other core libraries so it must only depend
// on public SDK and intra-core APIs.
@@ -617,7 +645,6 @@
stl: "c++_shared",
}
-
java_library {
name: "conscrypt-test-support",
visibility: [
diff --git a/conscrypt.aconfig b/conscrypt.aconfig
new file mode 100644
index 0000000..781a626
--- /dev/null
+++ b/conscrypt.aconfig
@@ -0,0 +1,26 @@
+# Copyright (C) 2024 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+package: "com.android.org.conscrypt"
+container: "com.android.conscrypt"
+
+flag {
+ namespace: "core_libraries"
+ name: "certificate_transparency_platform"
+ description: "This flag controls whether conscrypt will interpret the NetworkSecurityConfig for Certificate Transparency"
+ bug: "319829948"
+ # APIs provided by a mainline module can only use a frozen flag.
+ is_fixed_read_only: true
+}
+