diff options
author | Elliot Sisteron <elliotsisteron@google.com> | 2023-10-09 15:41:02 +0000 |
---|---|---|
committer | Elliot Sisteron <elliotsisteron@google.com> | 2023-10-10 14:02:47 +0000 |
commit | 2d8f057c11991802152b68ce33e5d22d28dad30d (patch) | |
tree | 99985ab3e46daaddefea01635ab947ec6143bb1f /SafetyCenter | |
parent | 723041477a5ad2b026e9b8d10a06fb862224c30a (diff) | |
download | Permission-2d8f057c11991802152b68ce33e5d22d28dad30d.tar.gz |
Use RequiresApi annotation directly.
The lint is failing on CL, this appears to be due to the
RequiresApiTiramisuByDefault annotation.
Looks like the android.annotation.RequiresApi annotation
can be used on a package directly.
I've checked this on a CL and it appears to be WAI.
Let's try to submit this CL and check if the lint errors do
go away. Otherwise I'll revert back to using RequiresApi
on every class.
Test: lint works
Bug: 303836855
Relnote: N/A
Change-Id: Ied51bd506ec8a8ea59bbf63edd06423939df9a74
Diffstat (limited to 'SafetyCenter')
-rw-r--r-- | SafetyCenter/Annotations/java/com/android/safetycenter/annotations/RequiresTiramisuByDefault.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/SafetyCenter/Annotations/java/com/android/safetycenter/annotations/RequiresTiramisuByDefault.java b/SafetyCenter/Annotations/java/com/android/safetycenter/annotations/RequiresTiramisuByDefault.java deleted file mode 100644 index 6e1f4c3b7..000000000 --- a/SafetyCenter/Annotations/java/com/android/safetycenter/annotations/RequiresTiramisuByDefault.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.safetycenter.annotations; - -import static android.os.Build.VERSION_CODES.TIRAMISU; - -import static java.lang.annotation.ElementType.PACKAGE; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.CLASS; - -import androidx.annotation.RequiresApi; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.annotation.meta.TypeQualifierDefault; - -/** - * Specifies that all types are {@code RequiresApi(TIRAMISU)} within the annotated package, unless - * tagged another {@code @RequiresApi} annotation. - */ -@Retention(CLASS) -@Target(PACKAGE) -@TypeQualifierDefault({TYPE}) -@RequiresApi(TIRAMISU) -public @interface RequiresTiramisuByDefault {} |