summaryrefslogtreecommitdiff
path: root/java/config
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2023-12-12 23:13:57 +0000
committer Paul Duffin <paulduffin@google.com> 2023-12-13 00:33:25 +0000
commit7ac943f7e1e9872c92ff41f18c5a967371d8c731 (patch)
treec750d23dabf2c1b478da28f1f4236065bc8ce027 /java/config
parentc1fb159206d583cb82884a411fa20afa1b67c3bd (diff)
Use --revert-annotation instead of --hide-annotation
Use of `--hide-annotation android.annotation.FlaggedApi` was always an intermediate solution until the required semantics for `@FlaggedApi` was determined. The `--revert-annotation` option provides those semantics. When the `@FlaggedApi` is applied to an existing API, e.g. because it has moved from system to public, or because it has changed in some way, e.g. modifiers, then the correct semantics for when that API is not required is not to hide the API but to revert it to what it was before the change necessitating the `@FlaggedApi` annotation was made. Use --revert-annotation instead of --hide-annotation Use of `--hide-annotation android.annotation.FlaggedApi` was always an intermediate solution until the required semantics for `@FlaggedApi` was determined. The `--revert-annotation` option provides those semantics. When the `@FlaggedApi` is applied to an existing API, e.g. because it has moved from system to public, or because it has changed in some way, e.g. modifiers, then the correct semantics for when that API is not required is not to hide the API but to revert it to what it was before the change necessitating the `@FlaggedApi` annotation was made. Use --revert-annotation instead of --hide-annotation Use of `--hide-annotation android.annotation.FlaggedApi` was always an intermediate solution until the required semantics for `@FlaggedApi` was determined. The `--revert-annotation` option provides those semantics. When the `@FlaggedApi` is applied to an existing API, e.g. because it has moved from system to public, or because it has changed in some way, e.g. modifiers, then the correct semantics for when that API is not required is not to hide the API but to revert it to what it was before the change necessitating the `@FlaggedApi` annotation was made. Bug: 314196587 Test: ./gradlew Change-Id: Ic97f29dd2b9f598ba0851f5f622c2a2724f18037
Diffstat (limited to 'java/config')
-rw-r--r--java/config/droidstubs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/config/droidstubs.go b/java/config/droidstubs.go
index b7aab5a98..7029fee06 100644
--- a/java/config/droidstubs.go
+++ b/java/config/droidstubs.go
@@ -57,7 +57,7 @@ var (
MetalavaAnnotationsWarningsFlags = strings.Join(metalavaAnnotationsWarningsFlags, " ")
metalavaHideFlaggedApis = []string{
- "--hide-annotation",
+ "--revert-annotation",
"android.annotation.FlaggedApi",
}