From bf63f941a095492067bf2faa7f9aceadfc60c86a Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 20 May 2020 12:06:23 +0100 Subject: Remove nullablility annotations from module-lib They were added to workaround the problem of package-private versions being added to the stubs, which prevented use of the annotations from mainline modules. Having them in the API leads to a different problem -- this version of the nullability annotations have SOURCE retention. However in the stubs build we want to have CLASS retention, so that kotlin can make use of their presence. This is arguably a much cleaner fix, since having a source-retention annotation doesn't really make much sense. Bug: 157010342 Test: m Change-Id: Id78f00da5b6af2930224a82faa24cb8235362521 --- core/java/android/annotation/NonNull.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'core/java/android/annotation/NonNull.java') diff --git a/core/java/android/annotation/NonNull.java b/core/java/android/annotation/NonNull.java index c5aff9d6794e..20472bacf6ad 100644 --- a/core/java/android/annotation/NonNull.java +++ b/core/java/android/annotation/NonNull.java @@ -20,8 +20,6 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.SOURCE; -import android.annotation.SystemApi.Client; - import java.lang.annotation.Retention; import java.lang.annotation.Target; @@ -36,6 +34,5 @@ import java.lang.annotation.Target; */ @Retention(SOURCE) @Target({METHOD, PARAMETER, FIELD}) -@SystemApi(client = Client.MODULE_LIBRARIES) public @interface NonNull { } -- cgit v1.2.3