Make change and version bump to r_aml_300800500 for mainline module file: manifest.json
Change-Id: Ib9ae23d3efc8f129cd44300b2f5cde39acc8c0bf
diff --git a/Android.bp b/Android.bp
index fdb078e..73fb565 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,6 +20,7 @@
name: "com.android.sdkext",
defaults: [ "com.android.sdkext-defaults" ],
binaries: [ "derive_sdk" ],
+ java_libs: [ "framework-sdkextensions" ],
prebuilts: [ "cur_sdkinfo" ],
manifest: "manifest.json",
min_sdk_version: "current",
@@ -29,7 +30,6 @@
name: "com.android.sdkext-defaults",
updatable: true,
min_sdk_version: "R",
- java_libs: [ "framework-sdkextensions" ],
prebuilts: [
"derive_sdk.rc",
],
diff --git a/manifest.json b/manifest.json
index 9be9533..5f39658 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,4 +1,4 @@
{
"name": "com.android.sdkext",
- "version": 300800400
+ "version": 300800500
}
diff --git a/testing/Android.bp b/testing/Android.bp
index 95981fa..3042a58 100644
--- a/testing/Android.bp
+++ b/testing/Android.bp
@@ -16,6 +16,7 @@
name: "test_com.android.sdkext",
visibility: [ "//system/apex/tests/sdkextensions" ],
defaults: ["com.android.sdkext-defaults"],
+ java_libs: [ "test_framework-sdkextensions" ],
manifest: "test_manifest.json",
prebuilts: [ "sdkinfo_45" ],
file_contexts: ":com.android.sdkext-file_contexts",
@@ -43,4 +44,41 @@
src: ":sdkinfo_45_src",
filename: "sdkinfo.binarypb",
installable: false,
+ visibility: [
+ ":__pkg__",
+ "//frameworks/av/apex/testing"
+ ],
+}
+
+filegroup {
+ name: "test_framework-sdkextensions-sources",
+ srcs: ["impl-src/**/*.java"],
+ path: "impl-src",
+}
+
+
+dex_import {
+ name: "test_framework-sdkextensions",
+ jars: ["test_framework-sdkextensions.jar"],
+ stem: "framework-sdkextensions",
+}
+
+// It isn't currently possible to build this from source because of limitations
+// in the build + hiddenapi generation.
+//java_library {
+// name: "test_framework-sdkextensions",
+// srcs: ["impl-src/**/*.java"],
+// static_libs: ["framework-sdkextensions.impl"],
+// libs: ["framework-annotations-lib"],
+// stem: "framework-sdkextensions",
+// sdk_version: "module_current",
+// installable: true,
+// hostdex: true, // for hiddenapi check
+//}
+
+java_library {
+ name: "test_framework-sdkextensions-stubs",
+ srcs: ["stub-src/**/*.java"],
+ sdk_version: "current",
+ visibility: [ "//system/apex/tests/sdkextensions" ],
}
diff --git a/testing/impl-src/android/os/ext/test/Test.java b/testing/impl-src/android/os/ext/test/Test.java
new file mode 100644
index 0000000..6fe3fa8
--- /dev/null
+++ b/testing/impl-src/android/os/ext/test/Test.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2020 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.os.ext.test;
+
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
+
+/** This class exists purely to test new API additions are callable in tests. */
+public class Test {
+
+ public Test() {}
+
+ public void publicMethod() {}
+
+ /** @hide */
+ @SystemApi
+ public void systemApiMethod() {}
+
+ /** @hide */
+ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ public void moduleLibsApiMethod() {}
+
+ /** @hide */
+ @TestApi
+ public void testApiMethod() {}
+
+ /** @hide */
+ public void hiddenMethod() {}
+
+}
diff --git a/testing/stub-src/android/os/ext/test/Test.java b/testing/stub-src/android/os/ext/test/Test.java
new file mode 100644
index 0000000..a59a084
--- /dev/null
+++ b/testing/stub-src/android/os/ext/test/Test.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 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.os.ext.test;
+
+public class Test {
+
+ public Test() {
+ throw new RuntimeException("Stub!");
+ }
+
+ public void publicMethod() {
+ throw new RuntimeException("Stub!");
+ }
+
+ public void systemApiMethod() {
+ throw new RuntimeException("Stub!");
+ }
+
+ public void moduleLibsApiMethod() {
+ throw new RuntimeException("Stub!");
+ }
+
+ public void testApiMethod() {
+ throw new RuntimeException("Stub!");
+ }
+
+ public void hiddenMethod() {
+ throw new RuntimeException("Stub!");
+ }
+
+}
diff --git a/testing/test_framework-sdkextensions.jar b/testing/test_framework-sdkextensions.jar
new file mode 100644
index 0000000..d1cbf45
--- /dev/null
+++ b/testing/test_framework-sdkextensions.jar
Binary files differ