diff options
author | 2024-09-30 21:28:58 +0000 | |
---|---|---|
committer | 2024-09-30 21:28:58 +0000 | |
commit | aacc5b4b86d078b01c52fb2655c06111400291e1 (patch) | |
tree | b05a4d14affac04f5b49c04645d59c322ff2d3e3 | |
parent | e40e1b29fa7d939ba38f3b194aa06e13b36de532 (diff) |
Move ravenwood annotations to module-utils (1/2)
Flag: EXEMPT host test change only
Bug: 292141694
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Ifae54b3233f142ad0fc7841d7e70897c459c2c07
12 files changed, 0 insertions, 434 deletions
diff --git a/Android.bp b/Android.bp index 72f675905aa3..879a12820c51 100644 --- a/Android.bp +++ b/Android.bp @@ -64,7 +64,6 @@ filegroup { srcs: [ // Java/AIDL sources under frameworks/base ":framework-annotations", - ":ravenwood-annotations", ":framework-blobstore-sources", ":framework-core-sources", ":framework-drm-sources", @@ -294,7 +293,6 @@ java_defaults { enforce_permissions_exceptions: [ // Do not add entries to this list. ":framework-annotations", - ":ravenwood-annotations", ":framework-blobstore-sources", ":framework-core-sources", ":framework-drm-sources", diff --git a/ravenwood/Android.bp b/ravenwood/Android.bp index 6b1197ad4c18..11b66fc3f1e5 100644 --- a/ravenwood/Android.bp +++ b/ravenwood/Android.bp @@ -12,15 +12,6 @@ package { } filegroup { - name: "ravenwood-annotations", - srcs: [ - "annotations-src/**/*.java", - ], - path: "annotations-src", - visibility: ["//visibility:public"], -} - -filegroup { name: "ravenwood-services-policies", srcs: [ "texts/ravenwood-services-policies.txt", @@ -52,14 +43,6 @@ filegroup { visibility: ["//visibility:public"], } -java_library { - name: "ravenwood-annotations-lib", - srcs: [":ravenwood-annotations"], - sdk_version: "core_current", - host_supported: true, - visibility: ["//visibility:public"], -} - // This and the next module contain the same classes with different implementations. // "ravenwood-runtime-common-device" will be statically linked in device side tests. // "ravenwood-runtime-common-ravenwood" will only exist in ravenwood-runtime, which will take diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodClassLoadHook.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodClassLoadHook.java deleted file mode 100644 index 7a3142b041d1..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodClassLoadHook.java +++ /dev/null @@ -1,48 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * Add this with a fully-specified method name (e.g. {@code "com.package.Class.methodName"}) - * of a callback to get a callback at the class load time. - * - * The method must be {@code public static} with a single argument that takes {@link Class}. - * - * Typically, this is used with {@link #LIBANDROID_LOADING_HOOK}, which will load the necessary - * native libraries. - * - * @hide - */ -@Target({TYPE}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodClassLoadHook { - String value(); - - /** - * Class load hook that loads <code>libandroid_runtime</code>. - */ - public static String LIBANDROID_LOADING_HOOK - = "com.android.platform.test.ravenwood.runtimehelper.ClassLoadHook.onClassLoaded"; -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeep.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeep.java deleted file mode 100644 index f02f06c056bd..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeep.java +++ /dev/null @@ -1,37 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target({FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodKeep { -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepPartialClass.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepPartialClass.java deleted file mode 100644 index 784727410188..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepPartialClass.java +++ /dev/null @@ -1,34 +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 android.ravenwood.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodKeepPartialClass { -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepStaticInitializer.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepStaticInitializer.java deleted file mode 100644 index eeebee985e4a..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepStaticInitializer.java +++ /dev/null @@ -1,33 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * @hide - */ -@Target(TYPE) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodKeepStaticInitializer { -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepWholeClass.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepWholeClass.java deleted file mode 100644 index d2c77c1b8566..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodKeepWholeClass.java +++ /dev/null @@ -1,39 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * TODO: Create "whole-class-throw"? - * - * @hide - */ -@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodKeepWholeClass { -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirect.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirect.java deleted file mode 100644 index b582ccf7b656..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirect.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2024 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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target({METHOD}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodRedirect { -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirectionClass.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirectionClass.java deleted file mode 100644 index bee9222ae5eb..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRedirectionClass.java +++ /dev/null @@ -1,36 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target({TYPE}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodRedirectionClass { - String value(); -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRemove.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRemove.java deleted file mode 100644 index b69c63748d81..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodRemove.java +++ /dev/null @@ -1,52 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodRemove { - /** - * One or more classes that aren't yet supported by Ravenwood, which is why this method throws. - */ - Class<?>[] blockedBy() default {}; - - /** - * General free-form description of why this method throws. - */ - String reason() default ""; - - /** - * Tracking bug number, if any. - */ - long bug() default 0; -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodReplace.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodReplace.java deleted file mode 100644 index 57cdfd2240d0..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodReplace.java +++ /dev/null @@ -1,50 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * - * @hide - */ -@Target({METHOD}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodReplace { - /** - * One or more classes that aren't yet supported by Ravenwood, which is why this method is - * being replaced. - */ - Class<?>[] blockedBy() default {}; - - /** - * General free-form description of why this method is being replaced. - */ - String reason() default ""; - - /** - * Tracking bug number, if any. - */ - long bug() default 0; -} diff --git a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodThrow.java b/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodThrow.java deleted file mode 100644 index 19e6af1c478d..000000000000 --- a/ravenwood/annotations-src/android/ravenwood/annotation/RavenwoodThrow.java +++ /dev/null @@ -1,51 +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 android.ravenwood.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * TODO: Javadoc - * TODO: Create "whole-class-throw"? - * - * @hide - */ -@Target({METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface RavenwoodThrow { - /** - * One or more classes that aren't yet supported by Ravenwood, which is why this method throws. - */ - Class<?>[] blockedBy() default {}; - - /** - * General free-form description of why this method throws. - */ - String reason() default ""; - - /** - * Tracking bug number, if any. - */ - long bug() default 0; -} |