From 8be0952ecb7e528b6273eedac5d6810c48d786e7 Mon Sep 17 00:00:00 2001
From: Adrian Roos <roosa@google.com>
Date: Fri, 8 Sep 2023 12:52:42 +0000
Subject: [PATCH] UnflaggedApi: Disable enforcement for @SystemApi for now

The lint seems to trigger on methods inherited from
classes that are part of the public API surface.

Disables the lint for non-public surfaces until this is fixed.

Bug: 297362755
Test: m :checkapi
Change-Id: I6de0123ed8d54d88b7d78cc01e99e0558aa99413
---
 Android.bp           | 1 -
 api/StubLibraries.bp | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Android.bp b/Android.bp
index f1a3af27a6331..57a5a3c6bff1d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -621,7 +621,6 @@ metalava_framework_docs_args = "" +
     "--api-lint-ignore-prefix org. " +
     "--error NoSettingsProvider " +
     "--error UnhiddenSystemApi " +
-    "--error UnflaggedApi " +
     "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
     "--hide BroadcastBehavior " +
     "--hide CallbackInterface " +
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp
index c59a833133717..2f84df70fc40a 100644
--- a/api/StubLibraries.bp
+++ b/api/StubLibraries.bp
@@ -33,7 +33,7 @@ droidstubs {
         "android-non-updatable-stubs-defaults",
         "module-classpath-stubs-defaults",
     ],
-    args: metalava_framework_docs_args,
+    args: metalava_framework_docs_args + "--error UnflaggedApi ",
     check_api: {
         current: {
             api_file: ":non-updatable-current.txt",
-- 
GitLab