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

Commit 0a2e8716 authored by Paul Duffin's avatar Paul Duffin
Browse files

aapt2: Use android.annotation.Hide instead of @hide

Previously, `aapt2` would simply pass an `@hide` doctag through to the
generated `Manifest.java` or `R.java` files and would rely on Metalava
to do the right thing with it. While Metalava does currently support
that it now considers an `@hide` doc tag that is not a block tag, i.e.
start on its own line, as invalid and will report it as an error.

Rather than add custom code to move the `@hide` doctag to the correct
location, or require changes to the resource files where the `@hide`
doctags are written this change leverages the existing support for
handling annotations like `@SystemApi` to replace the `@hide` doctag
with an `@android.annotation.Hide` annotation.

Tests were added to `AnnotationProcessor_test.cpp` to test the handling
of `@hide` and other tests that were broken by this change were fixed.
One test was actually invalid as it specified `@TestApi` without
`@hide` so that too was fixed.

This change did cause a slight change to the contents of the
`framework-doc-system-stubs` as previously the Javadoc comments
still included `@hide` doctags but this change removes them.

Flag: EXEMPT build refactoring
Bug: 444151586
Test: m checkapi
Change-Id: I01c476ef2f47261001d8c89d0218897e45336b40
parent 555d47a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment