diff options
author | David Su <dysu@google.com> | 2019-12-18 21:58:11 -0800 |
---|---|---|
committer | David Su <dysu@google.com> | 2020-01-11 19:40:22 -0800 |
commit | ae7db98321fd63edb9254b57b77066f6ff707c60 (patch) | |
tree | 64509d9d4e5bb8ac9aea46308be6d588317f23dc /libs | |
parent | 04d53bdf36248cf6960f3fc40aedff9e371ac7c8 (diff) |
WifiTrackerLibTests: grant access to Wifi @hide APIs (Attempt 2)
WifiTrackerLibTest needs access to @hide APIs in
framework-wifi and framework-minus-apex.
Accomplish this by:
1. using framework-wifi-test-defaults (which
links framework-wifi and framework-minus-apex) to
grant compile-time access to these @hide APIs.
2. using "usesNonSdkApis" flag to grant run time
access to these @hide APIs.
Note that platform_apis=true doesn't work because
it will build against framework.jar, which only
has @SystemApi stubs from framework-wifi, not
@hide APIs.
Previous attempt broke git_master/apps target.
Bug: 146513037
Test: atest WifiTrackerLibTests
Test: m ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: Ic4cfa2a22269e4173db0019895fc02c6f4a6c71b
Diffstat (limited to 'libs')
-rw-r--r-- | libs/WifiTrackerLib/tests/Android.bp | 3 | ||||
-rw-r--r-- | libs/WifiTrackerLib/tests/AndroidManifest.xml | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libs/WifiTrackerLib/tests/Android.bp b/libs/WifiTrackerLib/tests/Android.bp index 0abd40148..b30a2f1a3 100644 --- a/libs/WifiTrackerLib/tests/Android.bp +++ b/libs/WifiTrackerLib/tests/Android.bp @@ -28,5 +28,6 @@ android_test { "android.test.mock", ], - platform_apis: true, + defaults: ["framework-wifi-test-defaults"], + certificate: "platform", // need platform certificate to access @hide APIs } diff --git a/libs/WifiTrackerLib/tests/AndroidManifest.xml b/libs/WifiTrackerLib/tests/AndroidManifest.xml index 2642960e7..fe624d3e3 100644 --- a/libs/WifiTrackerLib/tests/AndroidManifest.xml +++ b/libs/WifiTrackerLib/tests/AndroidManifest.xml @@ -33,4 +33,4 @@ android:label="WifiTrackerLib Tests"> </instrumentation> -</manifest>
\ No newline at end of file +</manifest> |