From 646b09fc91ff3fabeb064f8a0c28856a7f090cfe Mon Sep 17 00:00:00 2001 From: Oriol Prieto Gasco Date: Fri, 1 Mar 2024 17:12:02 +0000 Subject: [PATCH] Export flags used in FlaggedApi annotations Before calling a flagged API, client code must check the value of the flag which gates it. Those flags must be exported in order to be accessible from containers other than the container where the flag and the API are hosted. Bug: 320984775 Bug: 322839671 Test: m all_aconfig_declarations Test: printflags --format='{fully_qualified_name}:{is_exported}' | grep true Change-Id: I61f18732a5c8a69acb6e645b6bf04b7a08adb513 --- common/flags.aconfig | 10 ++++++++++ common/nearby_flags.aconfig | 1 + common/thread_flags.aconfig | 1 + 3 files changed, 12 insertions(+) diff --git a/common/flags.aconfig b/common/flags.aconfig index 19b522ca1b..30931df69e 100644 --- a/common/flags.aconfig +++ b/common/flags.aconfig @@ -6,6 +6,7 @@ container: "system" flag { name: "set_data_saver_via_cm" + is_exported: true namespace: "android_core_networking" description: "Set data saver through ConnectivityManager API" bug: "297836825" @@ -13,6 +14,7 @@ flag { flag { name: "support_is_uid_networking_blocked" + is_exported: true namespace: "android_core_networking" description: "This flag controls whether isUidNetworkingBlocked is supported" bug: "297836825" @@ -20,6 +22,7 @@ flag { flag { name: "basic_background_restrictions_enabled" + is_exported: true namespace: "android_core_networking" description: "Block network access for apps in a low importance background state" bug: "304347838" @@ -27,6 +30,7 @@ flag { flag { name: "ipsec_transform_state" + is_exported: true namespace: "android_core_networking_ipsec" description: "The flag controls the access for getIpSecTransformState and IpSecTransformState" bug: "308011229" @@ -34,6 +38,7 @@ flag { flag { name: "tethering_request_with_soft_ap_config" + is_exported: true namespace: "android_core_networking" description: "The flag controls the access for the parcelable TetheringRequest with getSoftApConfiguration/setSoftApConfiguration API" bug: "216524590" @@ -41,6 +46,7 @@ flag { flag { name: "request_restricted_wifi" + is_exported: true namespace: "android_core_networking" description: "Flag for API to support requesting restricted wifi" bug: "315835605" @@ -48,6 +54,7 @@ flag { flag { name: "net_capability_local_network" + is_exported: true namespace: "android_core_networking" description: "Flag for local network capability API" bug: "313000440" @@ -55,6 +62,7 @@ flag { flag { name: "support_transport_satellite" + is_exported: true namespace: "android_core_networking" description: "Flag for satellite transport API" bug: "320514105" @@ -62,6 +70,7 @@ flag { flag { name: "nsd_subtypes_support_enabled" + is_exported: true namespace: "android_core_networking" description: "Flag for API to support nsd subtypes" bug: "265095929" @@ -69,6 +78,7 @@ flag { flag { name: "register_nsd_offload_engine_api" + is_exported: true namespace: "android_core_networking" description: "Flag for API to register nsd offload engine" bug: "301713539" diff --git a/common/nearby_flags.aconfig b/common/nearby_flags.aconfig index b957d33ae7..b733849143 100644 --- a/common/nearby_flags.aconfig +++ b/common/nearby_flags.aconfig @@ -3,6 +3,7 @@ container: "system" flag { name: "powered_off_finding" + is_exported: true namespace: "nearby" description: "Controls whether the Powered Off Finding feature is enabled" bug: "307898240" diff --git a/common/thread_flags.aconfig b/common/thread_flags.aconfig index 09595a6b7d..43fc147fa8 100644 --- a/common/thread_flags.aconfig +++ b/common/thread_flags.aconfig @@ -3,6 +3,7 @@ container: "system" flag { name: "thread_enabled" + is_exported: true namespace: "thread_network" description: "Controls whether the Android Thread feature is enabled" bug: "301473012"