Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6fa7a3c7 authored by Mark Punzalan's avatar Mark Punzalan
Browse files

[aapt2] Generate @FlaggedApi annotations

Like we currently do for @TestApi and @SystemApi, we look for
"@FlaggedApi" and its parameters in the comment above the resource.

Bug: 295328308
Test: Did the following:
1. Ran `atest aapt2_tests`
2. Ran `aapt2 link` on public-staging.xml with an added @FlaggedApi
   in the comment for the resource currently there. Verified the
   @FlaggedApi annotation is present in the generated R.java.
3. Ran `m framework-minus-apex` and it built successfully.
4. Modified the @FlaggedApi comment with an invalid value (e.g.,
   `Flags.FOO` which does not exist). The build failed. Since
   @FlaggedApi is a source-only annotation (i.e., not present in the
   R.class file), we want to verify it was actually used in the build.

Change-Id: I0739f888d40269915c0acea5650c386da1a1782e
parent c7f2ff98
Loading
Loading
Loading
Loading
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