summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-01-03 00:52:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-01-03 00:52:37 +0000
commit12bc693db9f413391e65b3e853b1cd916e6d54ff (patch)
tree972d6e7ab28297129d8d0008b57dea43aea2fa35
parent0679e993c285c75840aeddac162dd334a01f5844 (diff)
parentb0de7b75bd925f5aebf6b82edcf45faf889fa6dd (diff)
Merge changes from topics "framework-wifi-test-defaults", "wifitrackerlibtests-access-hidden-apis"
* changes: WifiTrackerLibTests: grant access to Wifi @hide APIs FrameworksWifiTests: build against framework-wifi Allow wifi-service to access @hide APIs from framework-wifi
-rw-r--r--libs/WifiTrackerLib/tests/Android.bp2
-rw-r--r--libs/WifiTrackerLib/tests/AndroidManifest.xml4
-rw-r--r--service/Android.bp27
-rw-r--r--tests/wifitests/Android.bp3
4 files changed, 21 insertions, 15 deletions
diff --git a/libs/WifiTrackerLib/tests/Android.bp b/libs/WifiTrackerLib/tests/Android.bp
index 0abd40148..0305bf1bb 100644
--- a/libs/WifiTrackerLib/tests/Android.bp
+++ b/libs/WifiTrackerLib/tests/Android.bp
@@ -28,5 +28,5 @@ android_test {
"android.test.mock",
],
- platform_apis: true,
+ defaults: ["framework-wifi-test-defaults"],
}
diff --git a/libs/WifiTrackerLib/tests/AndroidManifest.xml b/libs/WifiTrackerLib/tests/AndroidManifest.xml
index 2642960e7..61660013b 100644
--- a/libs/WifiTrackerLib/tests/AndroidManifest.xml
+++ b/libs/WifiTrackerLib/tests/AndroidManifest.xml
@@ -17,7 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifitrackerlib.test" >
- <application>
+ <application android:usesNonSdkApi="true">
<uses-library android:name="android.test.runner" />
<activity android:label="WifiTrackerTestsDummyLabel"
android:name="WifiTrackerTestsDummyName">
@@ -33,4 +33,4 @@
android:label="WifiTrackerLib Tests">
</instrumentation>
-</manifest> \ No newline at end of file
+</manifest>
diff --git a/service/Android.bp b/service/Android.bp
index e52429970..25ec4dc64 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -87,12 +87,20 @@ java_library {
defaults: ["wifi-service-common"],
srcs: [ ":wifi-service-srcs" ],
+ // TODO(b/140299412) should be "core_current" since Wifi module is not allowed to use
+ // @CorePlatformApi's
+ sdk_version: "core_platform",
libs: [
"error_prone_annotations",
"jsr305",
"services",
- // load the resources from the resources APK.
- "wifi-service-resources"
+ // load the resources from the resources APK.
+ "wifi-service-resources",
+ "framework-wifi",
+
+ // TODO(b/135994092): Replace with framework-system-stubs once all @hide dependencies are
+ // resolved.
+ "framework-minus-apex",
],
static_libs: [
@@ -112,24 +120,24 @@ java_library {
"androidx.annotation_annotation",
"bouncycastle-unbundled",
"ksoap2",
- // Note: libprotobuf-java-lite uses a few core platform APIs which
- // does show up as @hide API usage. But, this can be safely ignored
- // since the library uses reflection to ensure that the OS does provide
- // the necessary core platform APIs.
+ // Note: libprotobuf-java-lite uses a few core platform APIs which
+ // does show up as @hide API usage. But, this can be safely ignored
+ // since the library uses reflection to ensure that the OS does provide
+ // the necessary core platform APIs.
"libprotobuf-java-lite",
"libnanohttpd",
"netd_aidl_interface-V2-java",
"services.net",
"wifi_proto_scorecard",
"wifi_proto_metrics",
- "PlatformProperties"
+ "PlatformProperties",
],
required: [
"cacerts_wfa",
"libwifi-jni",
"services",
- "wifi-service-resources",
+ "wifi-service-resources",
],
jarjar_rules: ":wifi-service-jarjar-rules",
@@ -143,9 +151,6 @@ java_library {
app_image: false,
},
- // TODO: Remove this once all @hide dependencies are resolved.
- platform_apis: true,
-
init_rc: ["wifi.rc"],
}
diff --git a/tests/wifitests/Android.bp b/tests/wifitests/Android.bp
index 611b2b1e3..aacdc561e 100644
--- a/tests/wifitests/Android.bp
+++ b/tests/wifitests/Android.bp
@@ -17,6 +17,8 @@
android_test {
name: "FrameworksWifiTests",
+ defaults: ["framework-wifi-test-defaults"],
+
srcs: [
"**/*.java",
// wifi-service sources must be included here so that the latest changes
@@ -100,7 +102,6 @@ android_test {
],
min_sdk_version: "29",
- platform_apis: true,
privileged: true,
test_suites: [
"device-tests",