Skip to content
Snippets Groups Projects
Commit 56896172 authored by Liz Kammer's avatar Liz Kammer Committed by Mårten Kongstad
Browse files

Expand @FlaggedApi(FLAG) constants in API signature files

The auto-generated Flags.FLAG_NAME constants are difficult to review in
API tracking files. metalava will expand annotation arguments if

  (1) the field declaration is known to metalava, and
  (2) the constant is not part of the API surface.

The auto-generated constants are hidden, so not part of any API surface.
This satisfies (1).

This CL adds the auto-generated sources to metalava's input. This
satisfies (2).

(cherry picked from commit 01544b94)

Bug: 297881670
Test: m checkapi
Test: m <partition>/etc/aconfig_flags.textproto & diff against a clean build
Merged-In: I757c6e87d81768ef6095a4bea67c74c3ae6028a7
Change-Id: I757c6e87d81768ef6095a4bea67c74c3ae6028a7
parent 053d01c1
No related branches found
No related tags found
No related merge requests found
......@@ -12,20 +12,27 @@
// See the License for the specific language governing permissions and
// limitations under the License.
aconfig_srcjars = [
":android.os.flags-aconfig-java{.generated_srcjars}",
":android.security.flags-aconfig-java{.generated_srcjars}",
":com.android.hardware.camera2-aconfig-java{.generated_srcjars}",
":com.android.window.flags.window-aconfig-java{.generated_srcjars}",
":com.android.hardware.input-aconfig-java{.generated_srcjars}",
":com.android.text.flags-aconfig-java{.generated_srcjars}",
]
filegroup {
name: "framework-minus-apex-aconfig-srcjars",
srcs: aconfig_srcjars,
}
// Aconfig declarations and libraries for the core framework
java_defaults {
name: "framework-minus-apex-aconfig-libraries",
// Add java_aconfig_libraries to here to add them to the core framework
srcs: [
":android.os.flags-aconfig-java{.generated_srcjars}",
":android.security.flags-aconfig-java{.generated_srcjars}",
":com.android.hardware.camera2-aconfig-java{.generated_srcjars}",
":com.android.window.flags.window-aconfig-java{.generated_srcjars}",
":com.android.hardware.input-aconfig-java{.generated_srcjars}",
":com.android.text.flags-aconfig-java{.generated_srcjars}",
],
// Add aconfig-annotations-lib as a dependency for the optimization
srcs: aconfig_srcjars,
libs: ["aconfig-annotations-lib"],
}
......
......@@ -29,6 +29,9 @@
droidstubs {
name: "api-stubs-docs-non-updatable",
srcs: [
":framework-minus-apex-aconfig-srcjars",
],
defaults: [
"android-non-updatable-stubs-defaults",
"module-classpath-stubs-defaults",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment