summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AconfigFlags.bp21
-rw-r--r--libcore-readonly.aconfig25
2 files changed, 46 insertions, 0 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index fbe4905d9754..9bc4047ec443 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -107,6 +107,7 @@ aconfig_declarations_group {
"hwui_flags_java_lib",
"interaction_jank_monitor_flags_lib",
"libcore_exported_aconfig_flags_lib",
+ "libcore_readonly_aconfig_flags_lib",
"libgui_flags_java_lib",
"power_flags_lib",
"sdk_sandbox_flags_lib",
@@ -166,6 +167,26 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
+// See b/368409430 - This is for libcore flags to be generated with
+// force-read-only mode, so access to the flags does not involve I/O,
+// which could break Isolated Processes with I/O permission disabled.
+// The issue will be addressed once new Aconfig storage API is landed
+// and the readonly version will be removed.
+aconfig_declarations {
+ name: "libcore-readonly-aconfig-flags",
+ package: "com.android.libcore.readonly",
+ container: "system",
+ srcs: ["libcore-readonly.aconfig"],
+}
+
+// Core Libraries / libcore
+java_aconfig_library {
+ name: "libcore_readonly_aconfig_flags_lib",
+ aconfig_declarations: "libcore-readonly-aconfig-flags",
+ mode: "force-read-only",
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// Telecom
java_aconfig_library {
name: "telecom_flags_core_java_lib",
diff --git a/libcore-readonly.aconfig b/libcore-readonly.aconfig
new file mode 100644
index 000000000000..3cda92c45190
--- /dev/null
+++ b/libcore-readonly.aconfig
@@ -0,0 +1,25 @@
+package: "com.android.libcore.readonly"
+container: "system"
+
+# These are the read-only version of the aconfig flags in com.android.libcore
+# that will be built with 'force-read-only' mode.
+# See b/368409430 - these flags will be removed once the new aconfig API landed.
+flag {
+ namespace: "core_libraries"
+ name: "post_cleanup_apis"
+ is_exported: false
+ description: "This flag includes APIs to add/remove/call callbacks post-cleanup"
+ bug: "331243037"
+ # APIs provided by a mainline module can only use a frozen flag.
+ is_fixed_read_only: true
+}
+
+flag {
+ namespace: "core_libraries"
+ name: "native_metrics"
+ is_exported: false
+ description: "This flag includes APIs fo maintaining and exposing native allocation metrics"
+ bug: "331243037"
+ # APIs provided by a mainline module can only use a frozen flag.
+ is_fixed_read_only: true
+}