Merge "Move NetworkStatsFactory into service directory"
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
//########################################################################
|
||||
// Build FrameworksNetTests package
|
||||
//########################################################################
|
||||
|
||||
android_test {
|
||||
name: "FrameworksNetTests",
|
||||
// Include all test java files.
|
||||
srcs: ["java/**/*.java"],
|
||||
java_defaults {
|
||||
name: "FrameworksNetTests-jni-defaults",
|
||||
static_libs: [
|
||||
"FrameworksNetCommonTests",
|
||||
"frameworks-base-testutils",
|
||||
@@ -21,6 +18,52 @@ android_test {
|
||||
"android.test.base",
|
||||
"android.test.mock",
|
||||
],
|
||||
jni_libs: [
|
||||
"ld-android",
|
||||
"libartbase",
|
||||
"libbacktrace",
|
||||
"libbase",
|
||||
"libbinder",
|
||||
"libbinderthreadstate",
|
||||
"libbpf",
|
||||
"libbpf_android",
|
||||
"libc++",
|
||||
"libcrypto",
|
||||
"libcutils",
|
||||
"libdexfile",
|
||||
"libdl_android",
|
||||
"libhidl-gen-utils",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"libjsoncpp",
|
||||
"liblog",
|
||||
"liblzma",
|
||||
"libnativehelper",
|
||||
"libnetdbpf",
|
||||
"libnetdutils",
|
||||
"libpackagelistparser",
|
||||
"libpcre2",
|
||||
"libprocessgroup",
|
||||
"libselinux",
|
||||
"libui",
|
||||
"libutils",
|
||||
"libvintf",
|
||||
"libvndksupport",
|
||||
"libtinyxml2",
|
||||
"libunwindstack",
|
||||
"libutilscallstack",
|
||||
"libziparchive",
|
||||
"libz",
|
||||
"netd_aidl_interface-cpp",
|
||||
"libnetworkstatsfactorytestjni",
|
||||
],
|
||||
}
|
||||
|
||||
android_test {
|
||||
name: "FrameworksNetTests",
|
||||
defaults: ["FrameworksNetTests-jni-defaults"],
|
||||
srcs: ["java/**/*.java"],
|
||||
platform_apis: true,
|
||||
test_suites: ["device-tests"],
|
||||
certificate: "platform",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.internal.net;
|
||||
package com.android.server.net;
|
||||
|
||||
import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
|
||||
import static android.net.NetworkStats.METERED_NO;
|
||||
@@ -70,6 +70,10 @@ public class NetworkStatsFactoryTest {
|
||||
IoUtils.deleteContents(mTestProc);
|
||||
}
|
||||
|
||||
// The libandroid_servers which have the native method is not available to
|
||||
// applications. So in order to have a test support native library, the native code
|
||||
// related to networkStatsFactory is compiled to a minimal native library and loaded here.
|
||||
System.loadLibrary("networkstatsfactorytestjni");
|
||||
mFactory = new NetworkStatsFactory(mTestProc, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user